* fix: prompt position on resize
* fix: u16 overflow
* fix: prompt position when terminal grows in height
* fix: exclude blank area from prompt height
fix: resume the early return to exclude a case where the terminal got smaller but the prompt is still visible
* fix: prevent any line overwriting at the cost of duplicate prompts
* fix: prevent width change from eating previous output
Combinations like `Ctrl+Alt+a` could not be mapped previously, since
some non-us keyboard layouts use those combinations for sending
characters like `@`.
Now, first check if there a binding was defined using that combination,
else interpret as raw characters. This should not affect those special
keyboard layouts, since they would be sending `Ctrl+Alt+<special char>`,
rather than what would be on the US layout.
E.g.
- Map `Ctrl+Alt+a` to an action
- `Ctrl+Alt+a` on (some) german keyboards would send `@`
- A german layout pressing those keys would send a key combination of `Ctrl+Alt+@`,
so they are unaffected by this change (they would have to specifically
map `Ctrl+Alt+@`)
- For any layout actually sending `Ctrl+Alt+a`, they get the mapped action
This also allows the user to bind a keybinding without modifiers.
This affects emacs mode and vi insert mode (vi normal mode
already allows such keybindings).
* add `HistoryFilter` and use it in engine, to allow not storing items with a given prefix
* use `with_history_exclusion_prefix` in demo
* review
* impl history filter on engine
* keep 1 filterered history item
* don't impl History on Box<T: History>
* Allow multi byte characters as the marker without panicking
* Clean up tests and add one for the remainder
* Remove extra whitespace
* Add missing feature toggle
* Clean up tests
* make multiline prompt color configurable
* remove unnused use statements
* minor comment update
* Clippy fix
new lints from rust 1.67
* Cargo fmt
---------
Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
* custom validator and prompt
* Split prompt and validator demo into two files
Also add info text when running
Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
* Fix the additional moves of normal mode `hjkl`
Fixesnushell/nushell#6991
Allows using `l` to complete the history hint in normal mode
Support menu navigation with `hjkl` in vi normal mode
Adjusts tests
* Fix clippy
Parameter only used in recursion
* Split the main example binary into examples
Separate fully featured demo from keybinding listing and event listener
Allows to make `gethostname` dev-dependency
* Clippy fix in examples
Alternative to #503
Using `actions-rust-lang` instead of `actions-rs` for
setup. (nushell uses them for setup with integrated caching)
Remove build stage as this should also be covered by test.
clippy --all to see if this checks the examples as well.
7d721a1 introduced the sqlite-dynlib feature, but using it in places
where sqlite is currently used was not possible, because the cfg gates
weren't adjusted yet. This commit replaces each `feature = "sqlite"`
with `any(feature = "sqlite",feature = "sqlite-dynlib")`, meaning that
it doesn't matter which sqlite feature you use, reedline will expose the
same API.
* On backspace, deactivate menu and do not complete
Fixes#5497
* Make Tab insert (partial) completion instead of select next menu item
* Fix history search filtering
* render right prompt on the last line of the left prompt
Closesnushell/nushell#4909
* make rendering the right prompt on the last line configurable
* calculate width of the line where right prompt will be rendered