Changes the history API to support different storage backends and more rich information to be used as metadata/filtering criterions.
Includes a SQLite backed history with additional fields and ports the simple `FileBackedHistory` format consistent.
Includes a `HistoryCursor` to abstract the internal interactive browsing.
Updates `History` trait to cover the API to load and store to the storage backend.
Commits
* basic sqlite history
* fix test compilation
* final touches for MVP
* better documentation
* fix for empty history
* partial change to non-generic history
* mostly working
* fix tests and ci
* fixes, format
* move history item to new file
* fix some comments, fix test compile errors
todo: fix tests
* ci features matrix
* fix index creation
* fix file-based tests
* move logic for not saving empty entries to engine
* fix update last command on empty, set up application_id and check version
* add specific error variants
* format
* fix compile errors
* fix fmt
* sqlite with bashisms
* hide with features
* cargo fmt
* improve performance of bashisms selectors
* Style: Remove commented out code
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
Co-authored-by: Fernando Herrera <fernando.j.herrera@gmail.com>
Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
* Ignore tarpaulin coverage build folder and html report
* Add tests for line buffer
* Capitalize char only moves a character to right
* Uppercasing and lowercasing words works
* Fix the swap grapheme function
I have made this to be close to what I inferred the intent to be. I
really think we should probably have two functions which do this:
`swap_grapheme_left` and `swap_grapheme_right` which work in the
mentioned direction.
* Fix swap words
Swap words only swap words and there is no change in position.
* [WIP] Fixing the history behavior
* Repaint mode switching after the 1sec case
* Back to history cursor with len for not used -> fixes the skipping the
most recent
* unit tests not yet adapted
* None logic not yet smart to be able to leave history traversal
* Rewriting history with JT
Fixing the basic traversal as well as the prefix based search.
Ctrl-R search still dysfunctional. Missing the duplicate detection, thus
not passing tests. Missing test coverage for moving forward in a search.
* Complete basic history test suite
* Test the forward behavior in prefix search
* Skip consecutive equal matches
* Fix Ctrl-R search
* Update file_backed.rs
Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
With this patch, if you hold ALT (or Option on Mac) and then
press Arrow Left or Arrow Right, the cursor will jump over the
whole word instead of just one character to allow for more
natural text editing.