summaryrefslogtreecommitdiff
path: root/ui/editor.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/editor.go')
-rw-r--r--ui/editor.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/ui/editor.go b/ui/editor.go
index 5e3105b..f4bd247 100644
--- a/ui/editor.go
+++ b/ui/editor.go
@@ -63,12 +63,9 @@ func (e *Editor) Resize(width int) {
e.width = width
}
-func (e *Editor) IsCommand() bool {
- line := e.text[e.lineIdx]
-
- // Command can't start with two slashes because that's an escape for
- // a literal slash in the message
- return len(line) >= 1 && line[0] == '/' && !(len(line) >= 2 && line[1] == '/')
+// Content result must not be modified.
+func (e *Editor) Content() []rune {
+ return e.text[e.lineIdx]
}
func (e *Editor) TextLen() int {