Jonathan Turner
1a61030be5
Update Cargo.toml
2021-04-10 09:24:10 +12:00
Jonathan Turner
8ae6b58ae1
Split lib from main ( #37 )
...
* Split the library from the main
* Finish with lib refactor
2021-04-10 09:21:37 +12:00
Jason Hansen
bcf894076a
Remove Deref implementation and other refactorings ( #36 )
...
`Deref` no longer makes sense for `LineBuffer` since it can have
multiple lines.
2021-03-23 06:30:00 +13:00
Jonathan Turner
c376cefd3e
Begin multiline editing ( #35 )
2021-03-21 11:01:28 +13:00
Stefan Holderbach
d465afe536
Only append unique new lines to history ( #34 )
2021-03-21 08:01:11 +13:00
Stefan Holderbach
14aa0cd00c
Add history command for debugging ( #33 )
2021-03-21 08:00:23 +13:00
Jason Hansen
d8e7b65fba
Simplify prompt code and handle narrow terminals ( #32 )
...
When there isn't enough room for both the left and right prompts, only
show the left one. Also truncate the left prompt if it's too wide.
2021-03-20 11:17:42 +13:00
Stefan Holderbach
43092998d3
Basic clear ( #30 )
...
* Basic clear
Addresses #28
Succeeds in providing a clear new screen for both the line editing and
reverse search mode.
Solution is conservative and prints more newlines than strictly
necessary as solutions with scrolling didn't seem to work as expected.
* Command based clear
* Redraw prompt indicator after history search
The prompt indicator gets drawn over when searching the history so we
need to restore it when done searching.
Co-authored-by: Jason Rodney Hansen <jasonrodneyhansen@gmail.com>
2021-03-20 08:27:42 +13:00
Darren Schroeder
6ec4f86068
added a slightly-fancy prompt ( #29 )
2021-03-19 06:39:23 +13:00
Basile Henry
073bdde3c8
Implement basic history search ( #27 )
2021-03-18 15:04:51 +13:00
Darren Schroeder
5e924ba896
small refactor ( #25 )
2021-03-18 06:53:22 +13:00
Stefan Holderbach
7f9cbe02db
Minimal enum to address #18 ( #22 )
...
* Minimal enum to address #18
Reuse outer Result for error handling only pass the special case
signals.
* Restore behavior of shell
* support exit via `exit` or `logout`
* Clear buffer on pressing Ctrl-c
* move one line down on Ctrl-c
* Handling by main maybe suboptimal
* Fix whitespace awareness regression
* Rename special Ctrl key signals
2021-03-18 00:01:50 +13:00
Jason Hansen
4ae019c6a5
Implement Deref for LineBuffer ( #23 )
...
This removes the need for `get_buffer()` everywhere.
2021-03-17 14:04:27 +13:00
Jonathan Turner
90aca707d0
Let's try adding a ci ( #24 )
2021-03-17 14:03:17 +13:00
Jason Hansen
2123d1d874
Add more commands and simplify some existing ones ( #21 )
2021-03-17 12:10:38 +13:00
Jason Hansen
073a62393a
Fix backspace and delete to use grapheme clusters ( #20 )
2021-03-16 18:17:07 +13:00
Jason Hansen
3896346444
Remove the need to allocate new Strings ( #19 )
2021-03-16 16:11:27 +13:00
crozbo
8683e8d2ae
Add binding for Ctrl+n and Ctrl+p ( #17 )
...
Co-authored-by: crozbo <crozbo@users.noreply.github.com>
2021-03-16 13:37:09 +13:00
Jonathan Turner
92459ce185
Allow the engine to read lines ( #16 )
2021-03-16 13:10:33 +13:00
Jonathan Turner
fe48177271
Move to use edit actions and an engine ( #14 )
2021-03-16 12:36:34 +13:00
Darren Schroeder
1f4d878059
add diagnostic routine with cmd line arg ( #13 )
...
* add diagnostic routine with cmd line arg
* return early
2021-03-14 06:52:55 +13:00
Ebuka Agbanyim
a1074fb54c
Remove rundant exit function. ( #12 )
...
Also hides unused modifiers field.
2021-03-11 07:45:46 +13:00
Jonathan Turner
77b0c20d91
Touchup ( #11 )
...
* WIP
* Move alt+arrow
2021-03-10 18:39:51 +13:00
Jason Hansen
24e890f815
Implement several new commands ( #10 )
2021-03-10 18:32:58 +13:00
Jason Hansen
98cb890919
Improve inc/dec of insertion point ( #9 )
...
Removed need to collect grapheme indices into a Vec. Also, we can slice
the buffer from or to the insertion point to not have to iterate through
all of the indices.
2021-03-10 15:44:14 +13:00
Jonathan Turner
f58df2eda0
Unicode movement, pt 2 ( #8 )
...
* Implement initial unicode movement and repaint
* Finish updating unicode navigation
* More fixes and refactor for ctrl
2021-03-09 15:30:38 +13:00
Jonathan Turner
bf161b1969
Unicode movement ( #7 )
...
* Implement initial unicode movement and repaint
* Finish updating unicode navigation
2021-03-09 14:47:49 +13:00
Niklas S
68f7adafb9
Simple history implementation ( #6 )
...
* Implement basic history for Up arrow key
* Add Arrow Down for history navigation
2021-03-09 12:23:30 +13:00
Basile Henry
b337d3a0db
Use Unicode words for movement ( #5 )
...
* Use Unicode words for movement
This also skips multiple consecutive non-word characters (word boundaries) as part of the movement in a similar way to how bash/readline do it.
* Simplify logic
* Fix off by one slicing issue and simplify logic further
2021-03-08 13:02:12 +13:00
Dheepak Krishnamurthy
4c63c7a0cd
Change unicode example ( #4 )
2021-03-06 12:00:26 +13:00
Jonathan Turner
1473098ff2
Merge in refactor and unicode work ( #3 )
...
* First stage of refactor
* Finish moving to insertion point
* refactor to move word
* WIP
* Working a bit better
2021-03-06 11:30:44 +13:00
Jonathan Turner
bf416d8e81
Merge pull request #2 from E3uka/implement-eof
...
Implement EOF
2021-03-05 07:05:33 +13:00
Ebuka Agbanyim
3fb9f09d5b
Implement EOF
...
This pull request allows you to exit the repl by pressing CTRL + d.
2021-03-04 16:01:55 +00:00
Jonathan Turner
794a0045bf
Merge pull request #1 from nschoellhorn/main
...
Implement primitive word-jumping
2021-03-02 06:56:13 +13: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
Jonathan Turner
236b6e0c09
Update README.md
2021-02-28 22:45:43 +13:00
Jonathan Turner
99b84142d2
Update README.md
2021-02-28 22:45:28 +13:00
Jonathan Turner
85d4627b7d
Update README.md
2021-02-28 22:45:18 +13:00
Jonathan Turner
b263b0790f
initial commit
2021-02-28 22:44:28 +13:00
Jonathan Turner
2b6fdbfa65
Initial commit
2021-02-28 22:42:07 +13:00