vim: Single quote mark (#27231)
Closes #22398 Release Notes: - vim: Adds `'` and `"` marks (last location jumped from in the current buffer, and location when last exiting a buffer) --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
d82b547596
commit
fa677bdc38
5 changed files with 88 additions and 3 deletions
|
@ -822,6 +822,19 @@ impl Vim {
|
|||
EditorEvent::Edited { .. } => self.push_to_change_list(window, cx),
|
||||
EditorEvent::FocusedIn => self.sync_vim_settings(window, cx),
|
||||
EditorEvent::CursorShapeChanged => self.cursor_shape_changed(window, cx),
|
||||
EditorEvent::PushedToNavHistory {
|
||||
anchor,
|
||||
is_deactivate,
|
||||
} => {
|
||||
self.update_editor(window, cx, |vim, editor, window, cx| {
|
||||
let mark = if *is_deactivate {
|
||||
"\"".to_string()
|
||||
} else {
|
||||
"'".to_string()
|
||||
};
|
||||
vim.set_mark(mark, vec![*anchor], editor.buffer(), window, cx);
|
||||
});
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue