Browse Source

console work

master
Julian Noble 3 months ago
parent
commit
7409f3a605
  1. 8
      src/bootsupport/modules/punk/console-0.1.1.tm
  2. 2
      src/modules/punk/repl-0.1.tm

8
src/bootsupport/modules/punk/console-0.1.1.tm

@ -177,9 +177,13 @@ namespace eval punk::console {
}
#todo - something better - the 'channel' concept may not really apply on unix, as raw mode is for input and output modes
#todo - something better - the 'channel' concept may not really apply on unix, as raw mode is set for input and output modes currently - only valid to set on a readable channel?
#on windows they can be set independently (but not with stty) - REVIEW
#NOTE - the is_raw is only being set in current interp - but the channel is shared.
#this is problematic with the repl thread being separate. - must be a tsv? REVIEW
proc enableRaw {{channel stdin}} {
variable is_raw
variable is_raw
variable previous_stty_state_$channel
set sttycmd [auto_execok stty]
if {[set previous_stty_state_$channel] eq ""} {

2
src/modules/punk/repl-0.1.tm

@ -1368,7 +1368,7 @@ proc repl::repl_handler {inputchan prompt_config} {
#but can be *slow* compared to unix e.g 400ms+ vs <2ms on FreeBSD !
set tputcmd [auto_execok tput]
if {$tputcmd ne ""} {
if {![catch {exec {*}$tputcmd cols lines} values} {
if {![catch {exec {*}$tputcmd cols lines} values]} {
lassign $values cols rows
}
}

Loading…
Cancel
Save