aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorMichael Davis2022-10-03 15:14:57 +0000
committerGitHub2022-10-03 15:14:57 +0000
commit6cca7375ec1965e61c791bbe738c617ea43c6dce (patch)
treeb53f48f9436e39b1efea8e1cb2df118acb2c7787 /helix-view/src
parent9124c231f426318e970c62647c1ddabed3c9a389 (diff)
Automatically track pseudo-pending text (#4077)
This change automatically tracks pending text for for commands which use on-next-key callbacks. For example, `t` will await the next key event and "t" will be shown in the bottom right-hand corner to show that we're in a pending state. Previously, the text for these on-next-key commands needed to be hard-coded into the command definition which had some drawbacks: * It was easy to forget to write and clear the pending text. * If a command was remapped in a custom config, the pending text would still show the old key. With this change, pending text is automatically tracked based on the key events that lead to the command being executed. This works even when the command is remapped in config and when the on-next-key callback is nested under some key sequence (for example `mi`).
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/editor.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 89759439..d09d0ac3 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -677,7 +677,6 @@ pub struct Editor {
pub idle_timer: Pin<Box<Sleep>>,
pub last_motion: Option<Motion>,
- pub pseudo_pending: Option<String>,
pub last_completion: Option<CompleteAction>,
@@ -758,7 +757,6 @@ impl Editor {
idle_timer: Box::pin(sleep(conf.idle_timeout)),
last_motion: None,
last_completion: None,
- pseudo_pending: None,
config,
auto_pairs,
exit_code: 0,