helix/helix-view/src
Michael Davis ba394dca6d
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>
2022-11-03 15:09:21 +09:00
..
handlers feat(csharp,debug): add C# debugger support (#4213) 2022-10-15 15:33:57 -05:00
base64.rs Use OSC 52 as a fallback for setting the system clipboard (#3220) 2022-11-02 10:12:40 +09:00
clipboard.rs Use OSC 52 as a fallback for setting the system clipboard (#3220) 2022-11-02 10:12:40 +09:00
document.rs cargo fmt 2022-10-21 13:26:22 +09:00
editor.rs Fix panic from two windows editing the same document (#4570) 2022-11-03 15:09:21 +09:00
env.rs Use OSC 52 as a fallback for setting the system clipboard (#3220) 2022-11-02 10:12:40 +09:00
graphics.rs Allow the area to be bigger than u16 (width and height remain u16) (#4318) 2022-10-26 12:00:13 +09:00
gutter.rs make underline_style a seperate option 2022-10-01 19:29:46 +02:00
info.rs fix: remove unneeded allocations when calling helix_view::Info::new 2022-10-11 15:47:11 +09:00
input.rs Propagate idle timeout event to components (#3172) 2022-10-11 09:10:01 +09:00
keyboard.rs Update to crossterm-0.25 (#3390) 2022-08-22 10:29:30 +09:00
lib.rs Use OSC 52 as a fallback for setting the system clipboard (#3220) 2022-11-02 10:12:40 +09:00
macros.rs Expand doc/view macros to allow fetching specific id 2022-09-03 12:36:06 +09:00
theme.rs commands: Make no arg ':theme' show name (#3740) 2022-10-26 11:59:50 +09:00
tree.rs Fix cargo doc warnings, and add GitHub action to ensure it (#3650) 2022-09-03 09:58:16 -05:00
view.rs Add View::apply for adjusting jumplist ranges 2022-10-11 12:17:32 +09:00