From 5fa37e0b1e69a0ffdf26ce9d022c854c10590aed Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Tue, 23 Sep 2025 01:12:04 -0400 Subject: [PATCH] make 52c924d nicer --- ntalk.tcl | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/ntalk.tcl b/ntalk.tcl index 946bffa4b5d8ede17bb121a58f370a7bd0465046..93e74c7f7c15b53b3e4a4c167ec1a1b631eeca2d 100755 --- a/ntalk.tcl +++ b/ntalk.tcl @@ -265,7 +265,7 @@ menu .menu.server.rm -tearoff 0 .menu.nt add command -label "about ntalk" -command { tk_messageBox -title "about ntalk" \ -message "ntalk\nby aleteoryx" \ - -detail "last updated 2025-09-22" \ + -detail "last updated 2025-09-23" \ -icon "info" } .menu.nt add separator @@ -656,14 +656,6 @@ bind . { focus .buffer vwait cscript bind . {} -.buffer configure -state disabled -bind .buffer { - set k %A - if {[string is alnum $k] || ($k != "\t" && [string is space $k])} { - focus .foot.input - .foot.input insert insert $k - } -} set fp [open $scriptpath w] puts $fp [string trim $cscript] @@ -892,8 +884,20 @@ proc n64k_date {} { ### BOOT ### -last 64 -pollmsgs 15000 +.buffer configure -state disabled +bind .buffer { + set k %A + if {$k == " " || ![string is control $k]} { + focus .foot.input + .foot.input insert insert $k + } elseif {$k == "\b" && [selection own] == ".foot.input"} { + focus .foot.input + .foot.input delete sel.first sel.last + } elseif {$k == "\b"} { + focus .foot.input + .foot.input delete [expr {max(0,[.foot.input index insert]-1)}] + } +} set typingid {} bind .foot.input { @@ -956,4 +960,5 @@ bind .foot.input [concat [bind .foot.input ] ";" { focus .foot.input - +last 64 +pollmsgs 15000