helix/helix-term/src/ui
Michael Davis 48373d4a2b
Clear completion when switching windows via click (#8118)
The completion component assumes that it operates on the same View but
it's possible to break this assumption by switching windows through
left-clicking. I believe we should clear the completion menu when
switching windows to fix this.

This change fixes a panic for this scenario:

* Open a buffer with LSP completion available
* Split the window (for example '<C-w>v')
* Enter insert mode and trigger the completion menu
* Select a completion candidate (for example with '<C-n>')
* Switch to the original window by left-clicking in its area
* Enter insert mode and make edits (for example 'o<backspace>')

This will trip the 'assert_eq' in Document::restore.
2023-08-31 15:12:32 +09:00
..
completion.rs Reformat with nightly rustfmt for better let-else formatting (#7721) 2023-07-27 11:57:19 +09:00
document.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
editor.rs Clear completion when switching windows via click (#8118) 2023-08-31 15:12:32 +09:00
info.rs Refactor Margin for fine grained control (#2727) 2022-06-22 01:52:08 +09:00
lsp.rs highlighted_code_block: Take input text as &str 2023-07-27 11:50:19 +09:00
markdown.rs highlighted_code_block: Take input text as &str 2023-07-27 11:50:19 +09:00
menu.rs transition to nucleo for fuzzy matching (#7814) 2023-08-30 13:26:21 +09:00
mod.rs transition to nucleo for fuzzy matching (#7814) 2023-08-30 13:26:21 +09:00
overlay.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
picker.rs transition to nucleo for fuzzy matching (#7814) 2023-08-30 13:26:21 +09:00
popup.rs Hide signature help if it overlays completion menu (#5523) 2023-03-31 15:19:28 +09:00
prompt.rs Preview the latest value for regular registers 2023-07-31 15:05:38 +09:00
spinner.rs Instant is more suitable than SystemTime for spinners 2022-02-10 11:12:47 +09:00
statusline.rs Show whether file readonly in statusline (#7740) 2023-08-08 14:51:34 +02:00
text.rs Fix 'attempt to divide by zero' panic (#6155) 2023-03-03 15:50:26 +09:00