aboutsummaryrefslogtreecommitdiff
path: root/widgets/exline.go
AgeCommit message (Collapse)Author
2019-09-04all: purge redundant underscoresWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-08-26Add :prompt commandChristopher Vittal
Usage: :prompt <prompt> <command...> Displays the prompt on the status bar, waits for user input, then appends that input as the last argument to the command and executes it. The input is passed as one argument to the command, unless it is empty, in which case no extra argument is added.
2019-08-19Add support for <C-j> as '<Enter>' in ExLineChristopher Vittal
2019-07-26Add tab completion to textinputsJeffas
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.
2019-07-26Add command history and cyclingGalen Abell
Aerc will keep track of the previous 1000 commands, which the user can cycle through using the arrow keys while in the ex-line. Pressing up will move backwards in history while pressing down will move forward.
2019-06-29Implement basic tab completion supportGregory Mullen
Tab completion currently only works on commands. Contextual completion will be added in the future.
2019-05-17s/aerc2/aerc/gDrew DeVault
2019-05-12Add initial compose widgetDrew DeVault
2019-05-11Refactor ctx stashing out of exlineDrew DeVault
2019-05-11Split ex line text handling into dedicated widgetDrew DeVault
2019-04-27lib/ui: introduce InvalidatableSimon Ser
Many Drawable implementations have their own Invalidate and OnInvalidate functions, with an unexported onInvalidate field. However OnInvalidate and Invalidate are usually not called in the same goroutine. This results in a race on this field, e.g.: Read at 0x00c000094748 by goroutine 7: git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1() /home/simon/src/aerc2/widgets/dirlist.go:85 +0x56 git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1() /home/simon/src/aerc2/widgets/spinner.go:93 +0x1bb Previous write at 0x00c000094748 by main goroutine: [failed to restore the stack] Goroutine 7 (running) created at: git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start() /home/simon/src/aerc2/widgets/spinner.go:46 +0x8f git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList() /home/simon/src/aerc2/widgets/dirlist.go:37 +0x286 git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView() /home/simon/src/aerc2/widgets/account.go:50 +0x5ca git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc() /home/simon/src/aerc2/widgets/aerc.go:60 +0x800 main.main() /home/simon/src/aerc2/aerc.go:65 +0x33e To fix this, introduce a new type, Invalidatable, which protects the field. Unfortunately the Drawable must be passed to the callback function in Invalidate, so we still need to re-implement this in each Invalidatable user.
2019-03-17Add basic terminal widgetDrew DeVault
2019-03-15Rig up key bindingsDrew DeVault
2019-03-15Implement key bindings subsystemDrew DeVault
Which is not yet rigged up
2019-01-14Add cursor handling in ex lineDrew DeVault
2018-06-11Apply gofmtDrew DeVault
2018-06-01switch to tcell from termboxMarkus Ongyerth
This is a simple mostly straight forward switch to tcell in favor of termbox. It uses the tcell native api (not the compat layer) but does not make use of most features. Further changes should include moving to tcell's views.TextArea and the general built in widget behaviour instead of the current ad hoc implementation. Regression: Cursor isn't shown in ex-line
2018-02-27Add statusline widgetDrew DeVault
2018-02-27Make ex line fully unicode awareDrew DeVault
2018-02-26Split UI library and widgetsDrew DeVault