diff options
author | Hubert Hirtz <hubert@hirtz.pm> | 2021-10-19 21:13:25 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-10-19 21:13:25 +0200 |
commit | ce78dab820c632550c7e767e4601d0d4d2e34de2 (patch) | |
tree | c14d06b0f2d44a6052e0c9d4daa294f7d61a641e /ui/ui.go | |
parent | Don'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.go | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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) { |