diff options
author | delthas <delthas@dille.cc> | 2021-07-14 00:03:27 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-07-14 11:40:38 +0200 |
commit | b680d6ccd1d8223ceb353987457098d86b7909e0 (patch) | |
tree | f3b9b2ae14e83aa77d6fafee9c12ee72a1c144af /ui/editor.go | |
parent | Print the channel topic on join (diff) |
ui: Introduce a vertical member list on channels
Also, fix the UI timeline clearing too much, as well as the status line.
Also, remove the width in the editor and buffer list constructors. We
were initializing them with wrong values, only to overwrite these values
with correct ones later in Resize().
Diffstat (limited to 'ui/editor.go')
-rw-r--r-- | ui/editor.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/editor.go b/ui/editor.go index a714587..7e8c96e 100644 --- a/ui/editor.go +++ b/ui/editor.go @@ -37,11 +37,12 @@ type Editor struct { autoCacheIdx int } -func NewEditor(width int, autoComplete func(cursorIdx int, text []rune) []Completion) Editor { +// NewEditor returns a new Editor. +// Call Resize() once before using it. +func NewEditor(autoComplete func(cursorIdx int, text []rune) []Completion) Editor { return Editor{ text: [][]rune{{}}, textWidth: []int{0}, - width: width, autoComplete: autoComplete, } } |