Releases: lmorg/readline
v4.0.0 (includes a breaking change)
Breaking change
v4.0.0 marks a breaking change to the tab completion function.
Earlier versions expected multiple parameters to be returned however from
v4.0.0 onwards, a pointer to a structure is instead expected:
type TabCompleterReturnT struct {
Prefix string
Suggestions []string
Descriptions map[string]string
DisplayType TabDisplayType
HintCache HintCacheFuncT
Preview PreviewFuncT
}
This allows for more configurability and without the cost of copying multiple
different pieces of data nor future breaking changes whenever additional new
features are added.
Improvements
-
support for wide and zero width unicode characters
(inherited from Murex) -
preview modes
(inherited from Murex) -
API improvements
-
rewritten event system
(discussion) -
vastly improved buffered rendering -- this leads to few rendering glitches
and particularly on slower machines and/or terminals -
added missing vim and emacs keybindings
(full list of keybindings) -
additional tests
-
fixed glitches on Windows terminals
(discussion) -
readline command mode
(discussion)
bug fixes
asynchronous updates / improved line wrapping
This release brings a considerable number of new features and bug fixes
inherited from readline's use in murex (https://github.com/lmorg/murex)
-
Wrapped lines finally working (where the input line is longer than the
terminal width) -
Delayed tab completion - allows asynchronous updates to the tab completion so
slower suggestions do not halt the user experience -
Delayed syntax timer - allows syntax highlighting to run asynchronously for
slower parsers (eg spell checkers) -
Support for GetCursorPos ANSI escape sequence (though I don't have a terminal
which supports this to test the code on) -
Better support for wrapped hint text lines
-
Fixed bug with $EDITOR error handling in Windows and Plan 9
-
Code clean up - fewer writes to the terminal