798c275345
Remove old cursor code.
2025-04-13 12:41:31 +02:00
257ce5c1fe
Move view position and cursors into a new EditorState struct.
2025-04-13 12:40:16 +02:00
693cdf078c
Update for latest Ropey 2.0 alpha.
2024-06-26 13:27:30 +02:00
c3b5529101
Update dependencies.
2024-06-15 11:16:40 +02:00
076e988df0
Use Cow<&str>
for rope grapheme iterator.
2024-06-15 07:48:16 +02:00
22d9f4f660
Update code for Ropey 2 method rename.
2024-06-08 16:51:27 +02:00
cd2314905a
Port to Ropey 2.0-alpha.
2024-06-08 07:58:58 +02:00
b1391ebb35
Fix shift key not working for typing capital letters.
...
Was due to a change in crossterm's API behavior.
2023-10-25 00:23:40 +02:00
fa577c4c4d
Update to latest crossterm.
2023-10-25 00:19:13 +02:00
fa55afeebe
Start moving editor over to using transactions.
...
Also switch from LedHash to TentHash.
2023-10-23 19:18:02 +02:00
4cafe8093b
Update to latest crossterm.
2021-06-15 23:38:03 -07:00
8776b96879
Fix bug in go-to-line.
...
Wasn't checking for maximum against the lines in the file.
2021-06-15 23:18:52 -07:00
e1d91ff43d
Move filepath into the Buffer struct.
2020-02-24 07:35:04 +09:00
4a33750a6b
Fix minor bug from the move to the new buffer.
2020-02-23 20:10:30 +09:00
c4fa72405f
Switch to new backend buffer for text, cursor, and undo management.
2020-02-23 19:56:08 +09:00
62bfd9e49c
Add hotkyes for moving up/down by several lines at a time.
2020-02-20 18:01:38 +09:00
9dc3f3aa4c
Visual styling tweaks, including a line separating the gutter.
2020-02-20 07:57:45 +09:00
dcc749893b
Fix minor bug in cursor-based view adjustment.
2020-02-18 20:19:49 +09:00
d7d98946e5
Handle zero-width graphemes (usually ill-formed) more gracefully.
2020-02-18 20:13:12 +09:00
a28629d8b4
Remove old formatter.rs file, which is no longer used.
2020-02-17 18:57:08 +09:00
e061603a6e
Gutter styling improvements.
...
Instead of having the hard line numbers alternate colors, give soft
wrapped lines their own lighter color. This still gives a nice
visual cue when lines are wrapped, but isn't as generally distracting.
2020-02-17 18:47:43 +09:00
6a736e0b66
Fixed the last obvious bug from the refactor.
2020-02-17 18:16:17 +09:00
0c29d104b1
Tweak for code clarity.
2020-02-17 07:46:27 +09:00
6d5cb16ef3
Another bug fix after the refactor.
2020-02-17 07:42:23 +09:00
82df4d64bd
Handle grapheme width more robustly.
2020-02-16 22:26:31 +09:00
7b71cf2fdd
Some minor code cleanup and shuffling.
2020-02-16 21:06:06 +09:00
6e239a3c92
Yet more bug fixes. Getting pretty close to fully functional again.
2020-02-16 19:03:43 +09:00
d7d7b7cd2b
More bug fixes from the refactor.
2020-02-16 18:09:49 +09:00
e5cac79829
Fix for two bugs from the previous refactor.
2020-02-16 17:14:36 +09:00
bfeaee602c
A bunch more work on refactoring how formatting works.
...
This compiles, but does not yet work correctly again. Tons of bugs.
2020-02-16 17:03:37 +09:00
8c1778f674
Use alternating gutter colors for lines of text.
...
This makes for a clearer visual distinction of where soft line
wrapping occurs.
2020-02-15 11:43:53 +09:00
9512018983
Implemented indentation for soft-wrapped lines again.
2020-02-13 19:29:23 +09:00
7b652c98da
Remove options for char wrap and non-wrapping. Always word-wrap.
2020-02-11 21:12:22 +09:00
f117fda29e
Cleaning up a bunch of old unused code.
2020-02-11 20:54:41 +09:00
19adb08170
Reworking the text formatting code.
...
It's a mess of indirection and over-abstraction, and this commit
is the first step at cleaning that up. In addition to making the
code easier to follow, it's also notably faster.
The only downside is we've (temporarily) lost indentation
continuation on line wrapping. But that can be added back without
too much trouble later.
2020-02-11 20:24:34 +09:00
6e8f132563
Don't visually freeze the UI on an onslaught of input.
2020-02-11 08:33:22 +09:00
d1de3aacb3
More efficient line block boundary finding.
2020-02-06 19:18:50 +09:00
f95cb7f641
Use saturating_sub() method instead of adhoc equivalent.
2020-02-06 18:19:50 +09:00
f582818387
Set the cursor position appropriately.
...
This makes international input popups get placed correctly for
terminals that do that.
2020-02-04 20:54:38 +09:00
0b8c590dea
More concise implementation of stderr capture.
2020-02-02 17:36:11 +09:00
dd40937cfa
Capture stderr output so that it can be printed after exit.
...
Otherwise is was just getting swallowed in the alternate terminal
buffer. This was especially annoying with panics, since their
messages and backtraces got completely swallowed.
2020-02-02 17:20:00 +09:00
8a49ed74c5
Fix bug in how vertical and horizontal offsets are calculated.
2020-02-02 00:14:08 +09:00
4e1bdc412c
Better white-space-favoring chunk-splitting behavior.
2020-02-01 23:06:15 +09:00
db0ce6a4f6
Bug fix + remove a debug print I accidentally left in.
2020-02-01 22:43:06 +09:00
ebfedab58c
Change how line chunking works, to favor breaking on whitespace.
2020-02-01 22:32:09 +09:00
18920d9e87
Slightly wider and darker gutter.
2020-02-01 18:12:06 +09:00
9ff24353b4
More color theme tweaks.
2020-02-01 17:56:24 +09:00
14adcf99cb
Nicer color theme.
2020-02-01 15:46:51 +09:00
e6a7d26dbd
Some minor code cleanups and fixes.
2020-01-25 04:28:00 +09:00
f3c59558bb
Added some code comments.
2020-01-25 04:18:23 +09:00