(define-integrable (window-char->image frame char)
(%window-char->image (frame-text-inferior frame) char))
+(define-integrable (window-direct-output-cursor! frame)
+ (buffer-window/direct-output-cursor! (frame-text-inferior frame)))
+
(define-integrable (window-direct-output-forward-char! frame)
(buffer-window/direct-output-forward-char! (frame-text-inferior frame)))
(not (%window-saved-screen window))
(screen-needs-update? (%window-saved-screen window))))
+(define (buffer-window/direct-output-cursor! window)
+ (if (%window-debug-trace window)
+ ((%window-debug-trace window) 'window window 'direct-output-cursor!))
+ (let ((mask (set-interrupt-enables! interrupt-mask/gc-ok)))
+ (let ((x-start (inferior-x-start (%window-cursor-inferior window)))
+ (y-start (inferior-y-start (%window-cursor-inferior window))))
+ (screen-direct-output-move-cursor
+ (%window-saved-screen window)
+ (fix:+ (%window-saved-x-start window) x-start)
+ (fix:+ (%window-saved-y-start window) y-start)))
+ (set-interrupt-enables! mask)
+ unspecific))
+
(define (buffer-window/direct-output-forward-char! window)
(if (%window-debug-trace window)
((%window-debug-trace window) 'window window
window-direct-output-insert-char!
window-direct-output-insert-newline!
window-direct-output-insert-substring!
+ window-direct-output-cursor!
window-direct-update!
window-home-cursor!
window-mark->coordinates
(export (edwin screen)
editor-frame-screen
editor-frame-select-cursor!
+ editor-frame-cursor-window
editor-frame-select-window!
editor-frame-selected-window
editor-frame-typein-window
(editor-frame-select-window! (screen-root-window screen) window)
(screen-modeline-event! screen window 'SELECT-WINDOW))
+(define-integrable (screen-cursor-window screen)
+ (editor-frame-cursor-window (screen-root-window screen)))
+
(define-integrable (screen-select-cursor! screen window)
(editor-frame-select-cursor! (screen-root-window screen) window))
(define (console-wrap-update! screen thunk)
screen
(let ((finished? (thunk)))
+ (window-direct-output-cursor! (screen-cursor-window screen))
(output-port/flush-output console-i/o-port)
finished?))
(if scroll-region
(cdr scroll-region)
(tn-y-size (screen-description screen))))
- (screen-cursor-y screen))))
+ (or (screen-cursor-y screen) 0))))
(define-integrable (output-1 screen command)
(output-n screen command 1))