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
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
8a49ed74c5
Fix bug in how vertical and horizontal offsets are calculated.
2020-02-02 00:14:08 +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
9ace1ecb68
Moved from termion to crossterm for terminal handling.
...
This should (hopefully) make led work on Windows now. Although
I don't have a Windows box to test on.
This also fixes a bug where control codes were ocassionally split
on input, resulting in e.g. a pg-down resulting in control
characters inserted into the buffer.
2020-01-25 04:07:56 +09:00
dab1c9ed1b
Updated to Rust 2018.
...
No functional changes.
2020-01-23 18:47:27 +09:00
2f5adfad75
Run rustfmt. No functional changes.
2018-08-17 20:36:24 -07:00
75742c7aa4
Fixed bug with gutter size not updating as line numbers get wider.
2018-07-20 01:31:56 -07:00
b19997b975
Did some basic optimizations that made things fast again. Yay!
...
The basis for the optimizations were some less basic changes made
in Ropey.
2018-07-05 04:41:58 -07:00
5ca0f5e406
Fomatted with recent rustfmt. No actual code changes.
2018-07-05 02:00:10 -07:00
de625e71dc
Updated to ropey git master, and got everything working again.
...
However, everything is very, very slow now.
2018-07-05 01:53:17 -07:00
16f2aab223
Updated to latest Ropey.
2018-01-11 02:05:00 -08:00
7121469cba
Termninal size information wasn't being set properly at startup.
2018-01-01 13:38:51 -08:00
1f62eb32a0
Fixed a bug where very narrow terminal sizes would crash the editor.
2018-01-01 02:37:33 -08:00
1bb93aae00
Got interactive responsiveness to terminal resizing working.
2018-01-01 02:30:11 -08:00
c91f1801ad
Fixed bug in screen buffer display code.
...
This both more correct and faster at the same time. Yay!
2018-01-01 01:27:37 -08:00
17beb9c06d
Using a smallstring implementation inside the screen buffer.
...
This keeps things contiguous in memory in the common case.
2017-12-31 20:05:00 -08:00
0a309fab1a
Made the screen buffer implemention way faster.
...
It's in a pretty good place now, I think. Although its memory
usage could be improved with a small string type.
2017-12-31 19:40:45 -08:00
945505c5ff
WIP making the buffer faster.
2017-12-31 19:30:28 -08:00
66a80baeed
Doing screen buffering to eliminate flicker.
...
At the moment, it's brain-dead and really slow.
2017-12-31 18:51:02 -08:00
b63bb6f87d
Fixed silly drawing bug.
...
The cursor wasn't displaying if it was on the end of a line.
2017-12-31 17:36:13 -08:00
c7adf195f7
Moving screen drawing handling to a submodule.
2017-12-31 17:30:21 -08:00
c11aee9bf6
WIP switching from Rustbox to Termion for terminal handling.
2017-12-31 16:55:27 -08:00
f221b90a82
Fixed cursor drawing for texts with graphemes in them.
2017-12-31 02:17:28 -08:00
2e9c2b2704
WIP getting graphemes working again.
2017-12-31 01:56:45 -08:00
47ed45aae6
More fixing.
2017-12-30 23:47:05 -08:00
9c302620e9
Updating to use the new Ropey.
...
This is mainly just for kicks and giggles, since it really won't
work quite properly anyway, due to the lack of grapheme indexing.
The next real thing is to... well, start from scratch.
2017-12-30 23:10:56 -08:00
45e6125bbc
Updated to work with more recent library versions. Also RustFmt.
2016-03-05 02:40:01 -08:00
6823706d69
Working towards rust stable support.
2015-07-06 18:39:00 -07:00
869cb187b6
Migrated code from std::old_io to std::io
2015-03-15 16:03:23 -07:00
57f013bd46
Updated to latest rustc and rustbox.
2015-03-15 14:47:16 -07:00
ed510cffbc
WIP more line wrapping options.
...
This commit just adds code to allow non-wrapping behavior.
2015-03-07 18:30:18 -08:00
b2f1044b48
Fixed bug resulting from API change in Ropey.
2015-03-03 16:27:38 -08:00
82e6fca1dd
Updated code for latest rustc.
2015-02-23 20:50:55 -08:00
c348f252bb
Fixed bug in buffer drawing code.
...
It was causing the entire last line to be re-scanned to find the
cursor drawing position if the cursor was at the end of the buffer.
This was both slow and resulted in an incorrect position, since
all the rest of the drawing assumes line blocks.
2015-02-22 20:24:19 -08:00
02f24e4e6f
WIP refactor to switch over to Rope from BufferNode.
2015-02-22 11:45:57 -08:00
d26c95ab1d
Fixed some bugs in the display code.
...
Everything seems to display correctly now.
2015-02-16 22:46:38 -08:00
311f8aca67
First attempt at making display code really take advantage of long line support.
...
It's not quite working right, but it does at least prevent performance
degradation.
2015-02-16 22:29:41 -08:00
a1d636a4d8
WIP: handling extremely long lines with good performance.
...
The formatters now work on grapheme iterators instead of directly on
lines, which frees up the LineFormatter to break up long lines into
smaller blocks of text. This is partially taken advantage of right
now in various parts of the code, but more work is still needed to
get it both working properly and fast.
2015-02-15 22:41:11 -08:00
f4a70ba1ad
Made screen drawing a tad faster for long lines.
...
In preparation for much more major speed-ups with long lines.
2015-02-15 20:35:17 -08:00
902d93e957
Line numbers are now displayed in left-hand gutter.
2015-02-08 19:17:48 -08:00
6fc2f34053
Finished converting the term_ui drawing code over to the new formatting code.
2015-02-07 21:37:11 -08:00