Fix continue-job-in-fg with a hack

part of darcs patch Fri Sep 23 22:16:49 MST 2005  Eric Knauel <knauel@informatik.uni-tuebingen.de>
This commit is contained in:
mainzelm 2005-10-11 15:43:19 +00:00
parent 60284755e2
commit ded258241f
4 changed files with 31 additions and 4 deletions

View File

@ -114,9 +114,11 @@
(begin
(drain-tty (current-output-port))
(def-prog-mode)
(clear)
(refresh)
(endwin)
(newline)
(drain-tty (current-output-port))
; (newline)
; (drain-tty (current-output-port))
(obtain-lock paint-lock)
(set-tty-process-group
(current-output-port) (proc:pid (job-proc job)))
@ -125,6 +127,7 @@
(set-tty-process-group (current-output-port) (pid))
(display "Press any key to return to Commander S...")
(wait-for-key)
(set-redisplay-everything)
(release-lock paint-lock))))
(define (continue-job-in-background job)

View File

@ -525,6 +525,14 @@
(send (current-viewer)
'key-press ch c-x-pressed?))
(obtain-lock paint-lock)
;;; only necessary when continueing a background job in fg
(if (redisplay-everything?)
(begin
(paint-result-frame-window)
(paint-active-command-window)
(unset-redisplay-everything)))
(paint-result-window (entry-data (current-history-item)))
(move-cursor (command-buffer) (result-buffer))
(refresh-result-window)

View File

@ -12,7 +12,11 @@
(export display-to-string
write-to-string
on/off-option-processor
paste-selection))
paste-selection
set-redisplay-everything
unset-redisplay-everything
redisplay-everything?))
(define-structure utils utils-interface
(open scheme
@ -774,6 +778,7 @@
eval-environment
initial-tty
ncurses
utils
terminal-buffer
nuit-windows
app-windows

View File

@ -24,3 +24,14 @@
(if for-scheme-mode?
(to-scheme (car vals))
(to-command (car vals))))))
(define *redisplay-everything* #t)
(define (set-redisplay-everything)
(set! *redisplay-everything* #t))
(define (unset-redisplay-everything)
(set! *redisplay-everything* #f))
(define (redisplay-everything?)
*redisplay-everything*)