From 406aeafd2eb90ccc5c80cdb62ccb17fc535109d0 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Fri, 7 Apr 2006 09:41:08 +0000 Subject: [PATCH] Set nodelay mode once and for all during window creation --- scheme/ncurses.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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))))))