diff options
author | Greg Anders <greg@gpanders.com> | 2019-11-15 13:28:34 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-11-17 13:19:13 -0500 |
commit | 4bdef7d8609aa2d382fa74018e28ccb176276615 (patch) | |
tree | ef22e1ef17c3247de6531715c7502a3a3d313867 /lib | |
parent | 809083f8438401e2ee1d2d14712677f55eb4e4ef (diff) | |
download | aerc-4bdef7d8609aa2d382fa74018e28ccb176276615.tar.gz |
Add UI options to save/pipe messages with unsupported mimetypes
Adds a message indicating the user's ability to :save or :pipe a message
with an unsupported mimetype and also adds a selector widget (similar to
the tutorial).
The selector widget was previously defined in the account wizard module,
so this commit breaks it out into its own module to allow for re-use.
Further, modify the BeginExLine() function to take an argument that
pre-populates the command line, allowing functions to initiate an ex
command without executing it.
Closes #95.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ui/textinput.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go index 39351735..e81e8361 100644 --- a/lib/ui/textinput.go +++ b/lib/ui/textinput.go @@ -63,9 +63,10 @@ func (ti *TextInput) StringRight() string { return string(ti.text[ti.index:]) } -func (ti *TextInput) Set(value string) { +func (ti *TextInput) Set(value string) *TextInput { ti.text = []rune(value) ti.index = len(ti.text) + return ti } func (ti *TextInput) Invalidate() { |