little changes in comman-buffer and thus coherent adjustments
This commit is contained in:
parent
c59f7fdcda
commit
b5d7756adf
|
@ -19,16 +19,7 @@
|
||||||
(define input-field->command-history-item
|
(define input-field->command-history-item
|
||||||
(lambda (input-field)
|
(lambda (input-field)
|
||||||
(let* ((prompt (input-field-prompt input-field))
|
(let* ((prompt (input-field-prompt input-field))
|
||||||
; (prompt+texts (map list->string
|
|
||||||
; (input-field-window-lines input-field)))
|
|
||||||
; (texts (cons (substring (car prompt+texts)
|
|
||||||
; (string-length prompt)
|
|
||||||
; (string-length (car prompt+texts)))
|
|
||||||
; (cdr prompt+texts)))
|
|
||||||
(text (input-field-text input-field)))
|
(text (input-field-text input-field)))
|
||||||
; (fold-right string-append
|
|
||||||
; ""
|
|
||||||
; texts)))
|
|
||||||
(make-command-history-entry prompt text))))
|
(make-command-history-entry prompt text))))
|
||||||
|
|
||||||
(define (append-to-command-history! history-entry)
|
(define (append-to-command-history! history-entry)
|
||||||
|
@ -56,7 +47,7 @@
|
||||||
|
|
||||||
|
|
||||||
(define *history-down?* #t)
|
(define *history-down?* #t)
|
||||||
|
|
||||||
(define history-up
|
(define history-up
|
||||||
(lambda (com-buf)
|
(lambda (com-buf)
|
||||||
(let ((last-entry (history-last-entry (command-history))))
|
(let ((last-entry (history-last-entry (command-history))))
|
||||||
|
@ -346,7 +337,8 @@
|
||||||
(begin (resize-input-field) (move-input-field)))
|
(begin (resize-input-field) (move-input-field)))
|
||||||
(if (input-field-y-scroll input-field)
|
(if (input-field-y-scroll input-field)
|
||||||
(input-field-toggle-y-scroll input-field))))
|
(input-field-toggle-y-scroll input-field))))
|
||||||
(set-input-field-text! input-field text))))
|
(set-input-field-text! input-field text)
|
||||||
|
(input-field-refresh input-field))))
|
||||||
|
|
||||||
(define set-buffer-text! set-command-buffer-text!)
|
(define set-buffer-text! set-command-buffer-text!)
|
||||||
|
|
||||||
|
@ -399,13 +391,6 @@
|
||||||
(send-input-field input-field asc))
|
(send-input-field input-field asc))
|
||||||
(print-command-buffer com-buf)))
|
(print-command-buffer com-buf)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(define how-many-lines-in-command-buffer
|
(define how-many-lines-in-command-buffer
|
||||||
(lambda (com-buf text)
|
(lambda (com-buf text)
|
||||||
(let ((edit-lines (split-string-at-newline text))
|
(let ((edit-lines (split-string-at-newline text))
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
args="-lel afs/load.scm -lel pps/load.scm -lel module-system/load.scm -lel interaction/load.scm -lel cml/load.scm -lm debug-packages.scm -lel scsh-ncurses-1.0/load.scm -lm nuit-packages.scm -o nuit"
|
args="-lel afs/load.scm -lel pps/load.scm -lel module-system/load.scm -lel interaction/load.scm -lel cml/load.scm -lm debug-packages.scm -lel scsh-ncurses/load.scm -lm nuit-packages.scm -o nuit"
|
||||||
exec scsh $args -c "(nuit)"
|
exec scsh $args -c "(nuit)"
|
||||||
|
|
|
@ -277,7 +277,6 @@
|
||||||
in-comment?
|
in-comment?
|
||||||
in-string?
|
in-string?
|
||||||
next-is-escaped?)))
|
next-is-escaped?)))
|
||||||
;; TODO: handle strings and chars
|
|
||||||
(else (lp (+ i 1)
|
(else (lp (+ i 1)
|
||||||
open
|
open
|
||||||
in-comment?
|
in-comment?
|
||||||
|
@ -863,8 +862,7 @@
|
||||||
;; #### beep or so
|
;; #### beep or so
|
||||||
#f)
|
#f)
|
||||||
(destructure
|
(destructure
|
||||||
(((maybe-completed-line completions cursor-index to-complete cmdln) completion-info))
|
(((maybe-completed-line completions cursor-index to-complete cmdln) completion-info))
|
||||||
|
|
||||||
(if maybe-completed-line
|
(if maybe-completed-line
|
||||||
;; #### don't ask about the 2...
|
;; #### don't ask about the 2...
|
||||||
(display-completed-line maybe-completed-line))
|
(display-completed-line maybe-completed-line))
|
||||||
|
|
Loading…
Reference in New Issue