aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ui/textinput.go
Commit message (Collapse)AuthorAgeFilesLines
* completion: install panic handler in completion callbackRobin Jarry2022-03-251-0/+2
| | | | | | | | | This callback is actually invoked in a goroutine by time.AfterFunc. The panic handler must be explicitly installed. Link: https://github.com/golang/go/blob/go1.18/src/time/sleep.go#L160-L173 Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* lib/ui/textinput: stop at /, ", and ' charsPranjal Kole2022-02-031-5/+11
| | | | This matches the default behaviour of Ctrl+W in vim.
* completions: add support for completing multiple addressesParasrah2022-01-071-5/+6
| | | | | | | as per the discussion https://lists.sr.ht/~sircmpwn/aerc/patches/15367 this handles completions in `completer/completer.go` by enabling the completer to return a `prefix` that will be prepended to the selected completion candidate.
* go.mod: change base git urlRobin Jarry2021-11-051-1/+1
| | | | | | | I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
* lib/ui/textinput: Optimize ensureScrollAdnan Maolood2021-08-301-5/+5
|
* update tcell to v2 and enable TrueColor supporty0ast2020-12-181-1/+1
| | | | | | | | | Also update to the tcell v2 PaletteColor api, which should keep the chosen theme of the user intact. Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop clipping the value to one of the theme colors. Generally this is desired behaviour though.
* Implement style configuration.Kalyan Sriram2020-08-061-12/+20
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Revert "Implement style configuration."Reto Brunner2020-07-301-20/+12
| | | | This reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
* Implement style configuration.Kalyan Sriram2020-07-301-12/+20
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Revert "Add Style configuration"Drew DeVault2020-05-281-20/+12
| | | | This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
* Add Style configurationReto Brunner2020-05-271-12/+20
| | | | | | | | | | The following functionalities are added to configure aerc ui styles. - Read stylesets from file with very basic fnmatch wildcard matching - Add default styleset - Support different stylesets as part of UiConfig allowing contextual styles. - Move widgets/ui elements to use the stylesets. - Add configuration manual for the styleset
* Fix array out of bounds errorburrowing-owl2020-05-051-1/+1
|
* compose: don't call ti.tabcomplete when it is nilTimmy Douglas2020-01-091-0/+4
|
* Don't select completions until tab has been pressedBen Burwell2020-01-051-6/+8
| | | | | | | | | | | | | | | Before, pressing <Enter> when completions were visible would execute the selected completion. As soon as completions were provided, the first item would be selected. This could cause issues e.g. when changing folders: :cf <Enter> Previously, this would have selected the first folder in the list. Now, since <Tab>, <C-n>, etc have not been pressed to select the first completion, the command above simply executes `:cf `. To accomplish this, a "no-op completion" has been added at index -1.
* Show textinput completions in popoversBen Burwell2019-12-211-50/+223
| | | | | | Rather than showing completions inline in the text input, show them in a popover which can be scrolled by repeatedly pressing the tab key. The selected completion can be executed by pressing enter.
* Add UI options to save/pipe messages with unsupported mimetypesGreg Anders2019-11-171-1/+2
| | | | | | | | | | | | | | | 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.
* Add MouseableJeffas2019-09-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | This adds the Mouseable interface. When this is implemented for a component that item can accept and process mouseevents. At the top level when a mouse event is received it is passed to the grid's handler and then it trickles down until it reaches a component that can actually handle it, such as the tablist, dirlist or msglist. A mouse event is passed so that components can handle other things such as scrolling with the mousewheel. The components themselves then perform the necessary actions. Clicking emails in the messagelist opens them in a new tab. Textinputs can be clicked to position the cursor inside them. Mouseevents are not forwarded to the terminal at the moment. Elements which do not handle mouse events are not required to implement the Mouseable interface.
* Add delete forward <C-k> and backward <C-u>Christopher Vittal2019-08-121-0/+29
| | | | | | | | | | Choose the readline defaults for the behavior of these two functions/keybindings. Depending on the program, either of these can delete the whole line. Note that by default in [compose], <C-k> is bound to :prev-field<Enter>. Leave it up to the user whether or not they want to rebind the key in [compose].
* Add tab completion to textinputsJeffas2019-07-261-10/+74
| | | | | | | | | | | | | This adds tab completion to textinput components. They can be configured with a completion function. This function is called when the user presses <tab>. The first completion is initially shown to the user inserted into the text. Repeated presses of <tab> or <backtab> cycle through the completions list. The completions list is invalidated when any other non-tab-like key is pressed. Also changed is some logic for current completion generation so that all available commands are returned when <tab> is pressed with no current text and similarly for arguments of commands.
* Fix text input cursor position with non-ASCII textTuomas Siipola2019-07-171-3/+3
| | | | Fixes #171
* Implement basic tab completion supportGregory Mullen2019-06-291-0/+8
| | | | | Tab completion currently only works on commands. Contextual completion will be added in the future.
* ensureScroll on text input framesDrew DeVault2019-05-251-0/+2
|
* Implement scrolling in text inputDrew DeVault2019-05-251-3/+31
|
* Show account wizard if no accounts configuredDrew DeVault2019-05-221-1/+1
|
* New account wizard, part oneDrew DeVault2019-05-211-9/+22
|
* Let caller pass in custom headers to composeDrew DeVault2019-05-161-0/+4
|
* Update tab name as subject changesDrew DeVault2019-05-141-0/+15
| | | | Also moves truncation to the tab widget
* Implement :{next,prev}-field in compose viewDrew DeVault2019-05-121-3/+3
|
* Add initial compose widgetDrew DeVault2019-05-121-2/+3
|
* Refactor ctx stashing out of exlineDrew DeVault2019-05-111-0/+2
|
* Split ex line text handling into dedicated widgetDrew DeVault2019-05-111-0/+136