summaryrefslogtreecommitdiff
path: root/ui/editor.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/editor.go')
-rw-r--r--ui/editor.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/editor.go b/ui/editor.go
index 15785e8..a714587 100644
--- a/ui/editor.go
+++ b/ui/editor.go
@@ -164,16 +164,16 @@ func (e *Editor) Flush() (content string) {
return
}
-func (e *Editor) Clear() {
+func (e *Editor) Clear() bool {
if e.TextLen() == 0 {
- return
+ return false
}
e.text[e.lineIdx] = []rune{}
e.textWidth = e.textWidth[:1]
e.cursorIdx = 0
e.offsetIdx = 0
e.autoCache = nil
- return
+ return true
}
func (e *Editor) Right() {