summaryrefslogtreecommitdiff
path: root/ui/ui.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2021-10-19 21:13:25 +0200
committerHubert Hirtz <hubert@hirtz.pm>2021-10-19 21:13:25 +0200
commitce78dab820c632550c7e767e4601d0d4d2e34de2 (patch)
treec14d06b0f2d44a6052e0c9d4daa294f7d61a641e /ui/ui.go
parentDon't forget to close outgoing chan on debug (diff)
Only show buffer numbers when necessary
Saves space also removed non-edition related method IsCommand out of editor.go
Diffstat (limited to '')
-rw-r--r--ui/ui.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 9926fe7..db1d8bd 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -112,6 +112,10 @@ func (ui *UI) GoToBufferNo(i int) {
}
}
+func (ui *UI) ShowBufferNumbers(enable bool) {
+ ui.bs.ShowBufferNumbers(enable)
+}
+
func (ui *UI) ScrollUp() {
ui.bs.ScrollUp(ui.bs.tlHeight / 2)
}
@@ -192,12 +196,9 @@ func (ui *UI) SetPrompt(prompt StyledString) {
ui.prompt = prompt
}
-func (ui *UI) InputIsCommand() bool {
- return ui.e.IsCommand()
-}
-
-func (ui *UI) InputLen() int {
- return ui.e.TextLen()
+// InputContent result must not be modified.
+func (ui *UI) InputContent() []rune {
+ return ui.e.Content()
}
func (ui *UI) InputRune(r rune) {