Remove unnecessary argument from Vim#update_editor (#36001)

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin
2025-08-11 16:10:06 -06:00
committed by GitHub
parent fa3d0aaed4
commit add67bde43
24 changed files with 142 additions and 152 deletions
+5 -5
View File
@@ -19,7 +19,7 @@ use crate::{
impl Vim {
pub fn create_mark(&mut self, text: Arc<str>, window: &mut Window, cx: &mut Context<Self>) {
self.update_editor(window, cx, |vim, editor, window, cx| {
self.update_editor(cx, |vim, editor, cx| {
let anchors = editor
.selections
.disjoint_anchors()
@@ -49,7 +49,7 @@ impl Vim {
let mut ends = vec![];
let mut reversed = vec![];
self.update_editor(window, cx, |vim, editor, window, cx| {
self.update_editor(cx, |vim, editor, cx| {
let (map, selections) = editor.selections.all_display(cx);
for selection in selections {
let end = movement::saturating_left(&map, selection.end);
@@ -190,7 +190,7 @@ impl Vim {
self.pop_operator(window, cx);
}
let mark = self
.update_editor(window, cx, |vim, editor, window, cx| {
.update_editor(cx, |vim, editor, cx| {
vim.get_mark(&text, editor, window, cx)
})
.flatten();
@@ -209,7 +209,7 @@ impl Vim {
let Some(mut anchors) = anchors else { return };
self.update_editor(window, cx, |_, editor, _, cx| {
self.update_editor(cx, |_, editor, cx| {
editor.create_nav_history_entry(cx);
});
let is_active_operator = self.active_operator().is_some();
@@ -231,7 +231,7 @@ impl Vim {
|| self.mode == Mode::VisualLine
|| self.mode == Mode::VisualBlock;
self.update_editor(window, cx, |_, editor, window, cx| {
self.update_editor(cx, |_, editor, cx| {
let map = editor.snapshot(window, cx);
let mut ranges: Vec<Range<Anchor>> = Vec::new();
for mut anchor in anchors {