Browse Source

fix telnet local echo when server is echoing

master
Julian Noble 9 months ago
parent
commit
fb48b391ea
  1. 5
      src/modules/punk/basictelnet-999999.0a1.0.tm

5
src/modules/punk/basictelnet-999999.0a1.0.tm

@ -396,6 +396,7 @@ namespace eval punk::basictelnet {
#specifically named 'waiting' argument as last argument for cooperative input reading with other punk channel handlers (repl in particular)
#waiting data will be supplied to this handler if the other handler over-read (e.g repl handling ANSI ESC \[6n response on stdin finding other data before the ANSI response.)
proc toServer {sock} {
variable server_option_state
upvar ::punk::console::input_chunks_waiting input_chunks_waiting
set nextwaiting ""
@ -425,7 +426,8 @@ namespace eval punk::basictelnet {
}
# - review
if {$::punk::console::is_raw} {
#if we didn't make agreement that server would echo and we're in raw mode
if {![dict get $server_option_state 1] && $::punk::console::is_raw} {
puts -nonewline stdout $chunk
}
# -- --- --- ---
@ -523,6 +525,7 @@ namespace eval punk::basictelnet {
}
#write [string range $data 0 $idx-1]
puts -nonewline stdout [encoding convertfrom utf-8 [string range $data 0 $idx-1]]
flush stdout
set byte [string index $data [expr {$idx+1}]]
incr idx 2
if {$byte < "\xef"} {

Loading…
Cancel
Save