Ryan Russell
ae12c58f0f
Improve Readability ( #2639 )
2022-06-01 12:01:37 -05:00
Blaž Hrastnik
59f05088b9
Optimize rendering by using Ropey::byte_slice
...
This avoids costly conversions via byte_to_char (which are then
reversed back into bytes internally in Ropey).
Reduces time spent in slice/byte_to_char from ~24% to ~5%.
2022-03-17 09:29:47 +09:00
Blaž Hrastnik
2302869836
fix: ensure_grapheme_boundary_next_byte needs to index at valid char
2022-01-23 16:04:26 +09:00
Blaž Hrastnik
11c3ba9350
Speed up ensure_next_boundary during render
...
This code:
let start = ensure_grapheme_boundary_next(text, text.byte_to_char(start));
let end = ensure_grapheme_boundary_next(text, text.byte_to_char(end));
Would convert byte to char index, but then internally immediately convert back
to byte index, operate on it, then convert it to char index.
This change reduces the amount of time spent in ensure_grapheme_boundary from
29% to 2%.
2022-01-23 16:04:12 +09:00
Omnikar
45fadf6151
Add hyperlinks to fix cargo doc
warn ( #931 )
2021-10-29 09:55:15 +09:00
Kirawi
92c2d5d3bf
Document more of helix-core ( #904 )
2021-10-26 01:02:16 +09:00
Nathan Vegdahl
77a266e818
Better validation method APIs for Range
.
...
This way they do less work, are more specific to what we actually
need, and they compose.
2021-07-01 14:22:28 -07:00
Nathan Vegdahl
d07074740b
Add Range
methods for various kinds of validation.
2021-07-01 14:22:28 -07:00
Nathan Vegdahl
a6cadddef4
Fix silly mistake in previous phantom line bug fix.
...
Fixes #381 . I was trying to change an index value that... wasn't
even an index value.
2021-06-26 14:26:18 +09:00
Nathan Vegdahl
2dba228c76
Fix highlight code splitting graphemes.
...
This resulted in phantom blank lines in files with CRLF line
endings, but could potentially have manifested with other
graphemes as well.
2021-06-26 11:09:50 +09:00
Nathan Vegdahl
9cbf564d08
Handle erroneously ignored case in RopeGraphemes iterator.
2021-06-24 10:04:03 +09:00
notoria
1b14e9a19a
Downgrade unicode-segmentation
2021-06-10 22:00:08 +09:00
Ivan Tham
7cc13fefe9
Derive debug without feature
...
Note that this also removed those `finish_non_exhaustive()`.
2021-06-10 22:00:08 +09:00
notoria
1a3a924634
Implement Debug for data structure as a feature
2021-06-10 22:00:08 +09:00
Blaž Hrastnik
06aca7691c
clippy lint
2021-03-24 14:58:01 +09:00
Blaž Hrastnik
ad58286dc7
graphemes: fix nth_prev_grapheme_boundary calculation.
2021-02-26 15:53:01 +09:00
Blaž Hrastnik
6bd16a7320
graphemes: Optimize nth_next/nth_prev operation.
...
It's used a lot more than it used to in position calculation. Instead of
throwing away state between boundary calculation, reuse it.
2021-02-24 17:12:44 +09:00
Blaž Hrastnik
4ab5631d65
more lints
2021-02-18 18:45:41 +09:00
Blaž Hrastnik
c9dd1c930e
treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by ref
2021-02-18 18:34:22 +09:00
Blaž Hrastnik
3848058472
clippy lint
2020-06-02 10:49:28 +09:00
Blaž Hrastnik
613d06dfb0
wip: importing to github
2020-06-01 17:42:28 +09:00