vim gigv (#13028)
Release Notes: - vim: Fix `gi` when the insert ended at the end of a line (#12162) - vim: Add `gv` to restore previous visual selection (#12888) - vim: Fix `gl` when the first match is at the end of a line
This commit is contained in:
parent
3539a7c04a
commit
3b84b106e2
12 changed files with 239 additions and 49 deletions
|
@ -1,4 +1,8 @@
|
|||
use crate::{normal::repeat, state::Mode, Vim};
|
||||
use crate::{
|
||||
normal::{mark::create_mark, repeat},
|
||||
state::Mode,
|
||||
Vim,
|
||||
};
|
||||
use editor::{scroll::Autoscroll, Bias};
|
||||
use gpui::{actions, Action, ViewContext};
|
||||
use language::SelectionGoal;
|
||||
|
@ -15,6 +19,7 @@ fn normal_before(_: &mut Workspace, action: &NormalBefore, cx: &mut ViewContext<
|
|||
let count = vim.take_count(cx).unwrap_or(1);
|
||||
vim.stop_recording_immediately(action.boxed_clone());
|
||||
if count <= 1 || vim.workspace_state.replaying {
|
||||
create_mark(vim, "^".into(), false, cx);
|
||||
vim.update_active_editor(cx, |_, editor, cx| {
|
||||
editor.dismiss_menus_and_popups(false, cx);
|
||||
editor.change_selections(Some(Autoscroll::fit()), cx, |s| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue