Commit Graph

8 Commits

Author SHA1 Message Date
Jérémy Audiger
af7b447a06
Set MSRV to 1.62.1 (#554)
* Set MSRV to 1.62.1

* Update gitignore file to harmonize it.
2023-03-17 18:46:43 +01:00
Darren Schroeder
770faebfe0
update gitignore (#455) 2022-07-30 08:03:46 -05:00
phiresky
4f25ce5633
SQLite History and replaceable History backends (#401)
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>
2022-06-06 18:11:02 +02:00
Fernando Herrera
fbd7b20e8c
vi mode commands (#211)
* vi mode commands

* added search to left

* reordered files

* clippy corrections

* utf8 character offsets

* check valid input

* test has garbage

* Fix `f<char>` move starting on multibyte char

* Fix formatting

* added append command

* correcting failing tests

* append command doesnt require repaint

* Pedantic fixes

- Terminate statements with ;
- Make char references copies for performance

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2021-12-26 18:13:44 +00:00
Sherub Thakur
bfddc5870c
Add tests line buffer (and fix methods) (#150)
* 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.
2021-09-27 14:37:57 +13:00
Marco Zanrosso
29db18292f
[Improve] gitignore file adding MacOS ds_store (#114) 2021-07-23 10:33:27 +12:00
Stefan Holderbach
3dae21fe34
Fix the history behavior (#94) (#110)
* [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>
2021-07-21 06:11:26 +12:00
Niklas Schoellhorn
21180f15b5 Implement primitive word-jumping
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.
2021-03-01 08:36:19 +01:00