Store some vim state per-editor
This fixes a bug where opening and closing command would reset your selection incorrectly.
This commit is contained in:
parent
d308c91020
commit
3514816ece
12 changed files with 106 additions and 48 deletions
|
@ -4,7 +4,7 @@ use language::Point;
|
|||
use crate::{motion::Motion, utils::copy_selections_content, Mode, Vim};
|
||||
|
||||
pub fn substitute(vim: &mut Vim, count: Option<usize>, cx: &mut WindowContext) {
|
||||
let line_mode = vim.state.mode == Mode::VisualLine;
|
||||
let line_mode = vim.state().mode == Mode::VisualLine;
|
||||
vim.switch_mode(Mode::Insert, true, cx);
|
||||
vim.update_active_editor(cx, |editor, cx| {
|
||||
editor.transact(cx, |editor, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue