All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Picker longer quits when pressing 'Enter' with no matches
- The picker now quits on
ctrl + d
if the query is empty. - Add "Backspace Word" on
ctrl + w
.
- STDERR is now buffered to improve terminal write performance.
- Corrected docs to clarify that control characters should not be included in rendered text.
- Added configuration for prompt padding and scroll padding.
- Key-bindings to go forward and backward by word, and to clear before and after cursor.
- Support deleting next character (i.e.
Delete
on windows, andfn + delete
on MacOS).
PickerOptions::right_highlight_padding
has been deprecated; usePickerOptions::highlight_padding
instead.
- Fixed highlight padding to correctly fill for highlight matches very close to the end of the screen.
- Proper handling of graphemes and multi-width characters in the prompt string (#4).
- Removed some unnecessary features from dependencies.
- New implementation of
Render<T>
for any type which isfor<'a> Fn(&'a T) -> Cow<'a, str>
. - Improved documentation.
- Breaking
Picker
now requires newRender
implementation to describe how a given type is displayed on the screen.Picker::new
signature has changed.PickerOptions::picker
signature has changed.
- Breaking
PickerOptions::query
andPicker::set_query
now accept any argument which isInto<String>
instead ofToString
. - Breaking
Picker::pick
uses STDERR instead of STDOUT for interactive screen. A lock is acquired to STDERR to reduce the chance of rendering corruption and prevent Mutex contention.- If your application requires debug logging, it is probably best to log to a file instead.
- Breaking
Picker::injector
now returns anucleo_picker::Injector
instead of anucleo::Injector
. Thenucleo_picker::Injector
no longer exposes the internal match object; instead, rendering is done by the newRender
trait. - User CTRL-C during
Picker::pick
now returnsio::Error
with custom error message.
- Suggested support for multiple columns has now been removed (multiple columns were never supported internally).
- Picker no longer blocks STDIN and STDOUT. (#15)
- Pressing DELETE when the prompt is empty no longer causes screen redraw.
- Use synchronized output to avoid screen tearing on large render calls. (#14)
- Correctly handle
\!
,\^
, and\$
. - Query strings are now correctly normalized to replace newlines and tabs with single spaces, and to disallow ASCII control characters.
- Match highlighting. (#9)
- Robust Unicode and multi-line support
- Correctly renders multi-line items
- Unicode width computations to correctly handle double-width and zero-width graphemes.
- Full match item scrollback
- Convenient
Render
implementations in newrender
module. - New configuration options for
PickerOptions
. (#2) - New example:
fzf
clone - Convenience features for adding new items to a
Picker
:Picker
andInjector
now implementExtend
for convenient item adding.- With the optional
serde
feature, an&Injector
now implementsDeserializeSeed
to allow adding items from the picker directly from a deserializer.
- Better exposure of nucleo internals:
- Restart the internal matcher with
Picker::restart
- Update internal configuration without rebuilding the
Picker
usingPicker::update_config
- Modify the default query string using
Picker::update_query
- Restart the internal matcher with
- New
PickerOptions
for more flexiblePicker
configuration:- Specifying an initial query string with
PickerOptions::query
- Specifying an initial query string with
Picker::new
has been deprecated; usePickerOptions
.
- Modified interactive checks: now requires both stdin and stdout to be interactive.
- Various keybinding changes.