mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
2af14a24ab
char_idx_at_visual_row_offset asssumed that a single line/block break always corresponded to a vertical offset of 1. However conceal can hide the line break (in which case the certical offset would be 0) and line annotations (or softwrapped inlay hints at the end of the line) can insert addtional vertical lines. To correctly account for these cases we simply compute the visual offset of the start of the next block from the previous block instead of the visual offset of the block end. This means that the line breaks at the end of the block (however many there may be) are automatically included and we don't need to manually add 1 to the `row_offset` anymore. |
||
---|---|---|
.. | ||
src | ||
tests | ||
.gitignore | ||
Cargo.toml |