Commit Graph

42 Commits

Author SHA1 Message Date
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
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
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
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
dab1c9ed1b Updated to Rust 2018.
No functional changes.
2020-01-23 18:47:27 +09: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
dbb640b330 Fixed a couple of bugs that crashed at tiny terminal sizes. 2018-01-01 12:59:47 -08:00
2e9c2b2704 WIP getting graphemes working again. 2017-12-31 01:56:45 -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
f4847a4f8e Updated to latest Docopt and Ropey.
Also fixed bug resulting from a change in API behavior in Ropey.
2015-03-03 15:26:20 -08:00
ae26c5f873 Fixed bugs in LineFormatter that was causing weird cursor nav behavior.
They were two pretty much identical bugs in both index_offset_vertical_v2d()
and index_set_horizontal_v2d().  Neither method was checking for slipping
off the end of a line block.
2015-02-22 20:09:18 -08:00
1b3acfd29f Fixed bug in LineFormatter::index_offset_vertical_v2d()
The bug was causing very incorrect behavior when a single line was long
enough to be split into multiple blocks.
2015-02-22 19:30:13 -08:00
9c462ee332 Finished converting codebase back to plain Rope's.
Everything appears to be working identically to how it was before converting
back.
2015-02-22 18:13:10 -08:00
02f24e4e6f WIP refactor to switch over to Rope from BufferNode. 2015-02-22 11:45:57 -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
0bc809781d WIP: fixes for long line support. 2015-02-15 23:23:17 -08:00
ecf91607ac WIP long line support.
Got index_offset_vertical_v2d() partially working.  Still seems to be a tad
buggy, though.
2015-02-15 23:09:13 -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
2d50906f43 Moved the rest of file loading/saving into Buffer. 2015-02-07 23:35:25 -08:00
8f94b32953 Have view scrolling nearly working again.
Just doesn't *quite* work with wrapped lines.  Need to investigate.
2015-02-07 22:57:25 -08:00
870818fec8 Cursor movement appears to be working properly again. 2015-02-07 22:07:48 -08:00
27959dadf8 WIP fixing cursor movement code. 2015-02-07 21:38:16 -08:00
e9462e4400 Silencing some rustc warnings. 2015-02-07 19:55:25 -08:00
26965417f3 WOrking on getting cursor movement working again. 2015-02-07 19:46:08 -08:00
e9c06615f9 Silenced some compiler warnings. 2015-02-07 00:52:52 -08:00
6f2cbe5b87 Basic text buffer drawing is working again. 2015-02-07 00:45:28 -08:00
3ae51f7f7e Formatters are now primarily factories for iterators.
This is a big shift in the formatter API's.  It simplifies the
responsibilities of the implementers so that pretty much all they
have to do it implement an iterator.  Everything else will be
automatically derived from that.  (Or, at least, that's the hope.)
2015-02-06 23:58:19 -08:00