Set nodelay mode once and for all during window creation

This commit is contained in:
mainzelm 2006-04-07 09:41:08 +00:00
parent 40eed873a2
commit 406aeafd2e
1 changed files with 6 additions and 5 deletions

View File

@ -503,9 +503,12 @@
(import-lambda-definition newwin-internal
(height width starty startx)
"scsh_newwin")
(define (newwin h w x y)
(make-window (or (newwin-internal h w x y)
(raise-curses-error "newwin"))))
(let ((win (make-window (or (newwin-internal h w x y)
(raise-curses-error "newwin")))))
(nodelay win #t)
win))
(import-lambda-definition delwin-internal
@ -915,13 +918,11 @@
(win)
"scsh_wgetch")
(define (wgetch win)
(nodelay win #t)
(let ((ch (wgetch-internal (window-c-pointer win))))
(let ((ch (wgetch-internal (window-c-pointer win))))
(if (not (= err ch))
ch
(begin
(select-port-channels #f (current-input-port))
(nodelay win #f)
(wgetch-internal (window-c-pointer win))))))