diff options
author | Pascal Kuthe | 2023-03-02 18:10:47 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-03-09 04:01:02 +0000 |
commit | 2588fa3710921683c16a84ffd91103a0823a033b (patch) | |
tree | 6ff584e2e3a440a5ec18ab8be491f95b7a85a158 /helix-term/src/commands.rs | |
parent | 4300a3ad058ea383a59a0a90f31a597eb264a7d4 (diff) |
save selection before completion savepoint
Currently, the selection is not saved/restored when completion
checkpoints are applied. This is usually fine because undoing changes
usually restores maps selections back in insert mode. But this is not
always the case and especially problematic in the presence of
multi-cursor completions (since completions are applied relative to
the selection/cursor) and snippets (which can change the selection)
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 55ca875d..bc0e8ebe 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -4181,7 +4181,7 @@ pub fn completion(cx: &mut Context) { iter.reverse(); let offset = iter.take_while(|ch| chars::char_is_word(*ch)).count(); let start_offset = cursor.saturating_sub(offset); - doc.savepoint(); + doc.savepoint(&view); cx.callback( future, |