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
c3bfdf7a7f
Add Mark
and MarkSet
types for managing cursors etc.
...
Originally I was using just `(usize, usize)` for marks, and `Vec`s
of those for sets. But that was already becoming unwieldy even for
really basic code. This abstracts just a handful of common
operations away to make this easier to reason about. However,
the internals are (intentionally) left exposed to allow other fiddly
things to be done.
2020-02-11 11:35:31 +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
fb1996c21a
Have buffers store marks ranges.
...
This is very WIP. The intent is for these to be used for e.g.
cursors, screen positions, etc. The intent is for the buffer
itself to keep them synced properly with the actual text on edits,
although this is not yet implemented.
2020-02-01 11:17:08 +09:00
af71aea299
More notes about how I want undo to work.
2020-01-31 20:18:12 +09:00
1b32570b31
Added a markdown file to keep track of overall ideas for led.
2020-01-31 19:51:52 +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
a867892183
Replaced docopt with clap for command line argument parsing.
2020-01-24 18:32:42 +09:00
bdbd9bce21
Make tests compile again after updating to Rust 2018.
2020-01-23 19:04:45 +09:00
8773bcf0b5
Updated smallvec.
...
It was easy--turned out I wasn't using any of the APIs with
breaking changes.
2020-01-23 19:01:28 +09:00
f94fc0408f
Updated most dependencies to latest version.
...
Holding off on smallvec since there's an API break.
2020-01-23 18:57:34 +09:00
dab1c9ed1b
Updated to Rust 2018.
...
No functional changes.
2020-01-23 18:47:27 +09:00
9cadb9bd8c
Run rustfmt and replace depricated try!() macro with ? operator.
...
No functional changes.
2020-01-22 10:20:29 +09:00
f0a44ab300
More work on the backend, including adding data hashing code.
2020-01-22 10:17:56 +09:00
540803e0ee
Update dependencies.
2019-09-01 11:40:02 +09:00
6f4e619263
Update dependencies, including Ropey -> 1.0.
2019-01-06 17:38:44 -08:00
38ec53808f
Upgrade to latest version of dependencies, including Ropey v0.9.0.
2018-09-05 15:35:33 -07:00
a843aee904
Split text_encoding off into its own repo.
...
It's more generally useful, and I was working with it as its own
crate anyway.
2018-08-23 13:33:14 -07:00
30a1440399
Tests for single-byte encodings, and related bug fixes.
2018-08-23 13:21:16 -07:00
3d8eaefa6b
Added a lot of single-byte text encodings to text_encoding sub-crate.
...
They are largely auto-generated from text-based tables from the
WHATWG encoding standard. Most of them are still not available
in the code itself, but they are generating correctly, and exposing
them is just a matter of boiler plate.
2018-08-23 02:29:58 -07:00
3203da38bd
Added unit tests for windows1252 encoding/decoding.
2018-08-22 19:00:47 -07:00
fb95ff36c1
Added unit tests for latin1 encoding/decoding.
2018-08-22 18:17:05 -07:00
9409bfe7fb
Tests for utf8 encoding/decoding, and improved utf8 errors.
2018-08-22 17:53:07 -07:00
006b578318
Change encoding/decoding function naming.
...
I think this makes it more obvious at-a-glance what they do.
2018-08-22 15:05:38 -07:00
37acbba36a
Added unit tests for utf32 encoding/decoding.
2018-08-22 12:55:52 -07:00
2cc4bc64ba
More utf16 encode/decode tests, and accompanying fixes.
2018-08-21 22:32:19 -07:00
60cbb193b2
Added unit tests for utf16 encoding/decoding.
2018-08-21 22:18:22 -07:00
fc07ee3444
Reorg text_encoding sub-crate a bit and make it no_std.
2018-08-21 21:13:00 -07:00
3a17ca9e8c
Added utf32 encoders/decoders to the text_encoding sub-crate.
2018-08-21 05:25:53 -07:00
173837b827
Added property testing for encoding round-tripping.
...
Also fixed a bug in the utf16 encoders/decoders.
2018-08-20 22:30:39 -07:00
a82b06794e
Added Windows-1252 support to text_encoding sub-crate.
2018-08-20 21:09:01 -07:00