summaryrefslogtreecommitdiff
path: root/helix-term/src/args.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-03-22 15:23:29 +0000
committerBlaž Hrastnik2023-03-27 00:54:40 +0000
commit2af14a24abbd8de510f69e6569c18601533dc912 (patch)
treec43753ab9021b44f681f0a1a4ef1087216ce7566 /helix-term/src/args.rs
parent9fac574178bb6b66675ffc72819a79dee25112df (diff)
respect line annotations in char_idx_at_visual_row_offset
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.
Diffstat (limited to 'helix-term/src/args.rs')
0 files changed, 0 insertions, 0 deletions