summaryrefslogtreecommitdiff
path: root/catbird/line-editor.scm
diff options
context:
space:
mode:
Diffstat (limited to 'catbird/line-editor.scm')
-rw-r--r--catbird/line-editor.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/catbird/line-editor.scm b/catbird/line-editor.scm
index b991f47..4fe8cc7 100644
--- a/catbird/line-editor.scm
+++ b/catbird/line-editor.scm
@@ -76,14 +76,8 @@
#:init-value black)
(accepting-input? #:accessor accepting-input? #:init-value #t))
-(define-method (on-change (editor <line-editor>) slot old new)
- (case slot
- ((prompt)
- (update-visual editor))
- (else
- (next-method))))
-
-(define-method (on-boot (editor <line-editor>))
+(define-method (initialize (editor <line-editor>) initargs)
+ (next-method)
(attach-to editor
(make <label>
#:name 'prompt
@@ -116,6 +110,13 @@
(discard-next-char editor)
(update-visual editor))
+(define-method (on-change (editor <line-editor>) slot old new)
+ (case slot
+ ((prompt)
+ (update-visual editor))
+ (else
+ (next-method))))
+
;; Whenever a command key sequence is pressed while the line editor is
;; active we have to stop accepting text input for one tick.
;; Otherwise, an errant character shows up. For example, if the user