diff options
author | Michael Davis | 2022-11-03 06:09:21 +0000 |
---|---|---|
committer | GitHub | 2022-11-03 06:09:21 +0000 |
commit | ba394dca6d3a5b52622c4d7b0d3aba7c30af9701 (patch) | |
tree | b5ee33c8246d295a9ac2a74bada35d1cc37218f6 /runtime/queries/d/highlights.scm | |
parent | 1bed2f30435cfa45502ad2c481a1f4ffe4a1119a (diff) |
Fix panic from two windows editing the same document (#4570)
* Clamp highlighting range to be within document
This fixes a panic possible when two vsplits of the same document
exist and enough lines are deleted from the document so that one of
the windows focuses past the end of the document.
* Ensure cursor is in view on window change
If two windows are editing the same document, one may delete enough of
the document so that the other window is pointing at a blank page (past
the document end). In this change we ensure that the cursor is within
view whenever we switch to a new window (for example with `<C-w>w`).
* Update helix-term/src/ui/editor.rs
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Diffstat (limited to 'runtime/queries/d/highlights.scm')
0 files changed, 0 insertions, 0 deletions