helix-mirror/helix-term/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
..
commands Correctly handle escaping in completion (#4316) 2022-11-01 20:48:37 +09:00
keymap Change diagnostic picker keybind to <space>d (#4229) 2022-10-17 16:45:42 +09:00
ui Fix panic from two windows editing the same document (#4570) 2022-11-03 15:09:21 +09:00
application.rs nit: move an allocation to happen after a continue, making sure it's 2022-10-21 07:42:33 -05:00
args.rs Fix confusion with using --hsplit --vsplit on startup at same time (#4202) 2022-10-11 09:25:42 -04:00
commands.rs Exit select mode on replace commands (#4554) 2022-11-01 20:08:25 -05:00
compositor.rs Editor::flush_writes returns an error 2022-10-18 22:31:39 -04:00
config.rs Move top level lsp config to editor.lsp (#1868) 2022-03-28 10:11:52 +09:00
health.rs Show clipboard info in --health output (#2947) 2022-09-01 01:23:45 +09:00
job.rs remove Callback::Compositor variant 2022-10-18 22:31:39 -04:00
keymap.rs Improve keymap errors from command typos (#3931) 2022-09-22 09:30:42 +08:00
lib.rs Add refresh-config and open-config command (#1803) 2022-03-25 18:05:20 +09:00
main.rs document should save even if formatter fails 2022-10-18 22:31:39 -04:00