diff --git a/scheme/ncurses.scm b/scheme/ncurses.scm index 2be6cfa..b88a66d 100755 --- a/scheme/ncurses.scm +++ b/scheme/ncurses.scm @@ -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))))))