vim: Add support for :g/ and :v/ (#22177)
Closes #ISSUE Still TODO to make this feature good is better command history Release Notes: - vim: Add support for `:g/<pattern>/<cmd>` and `:v/<pattern>/<cmd>`
This commit is contained in:
@@ -10413,7 +10413,7 @@ impl Editor {
|
||||
self.end_transaction_at(Instant::now(), cx)
|
||||
}
|
||||
|
||||
fn start_transaction_at(&mut self, now: Instant, cx: &mut ViewContext<Self>) {
|
||||
pub fn start_transaction_at(&mut self, now: Instant, cx: &mut ViewContext<Self>) {
|
||||
self.end_selection(cx);
|
||||
if let Some(tx_id) = self
|
||||
.buffer
|
||||
@@ -10427,7 +10427,7 @@ impl Editor {
|
||||
}
|
||||
}
|
||||
|
||||
fn end_transaction_at(
|
||||
pub fn end_transaction_at(
|
||||
&mut self,
|
||||
now: Instant,
|
||||
cx: &mut ViewContext<Self>,
|
||||
|
||||
@@ -391,7 +391,7 @@ impl SelectionsCollection {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn change_with<R>(
|
||||
pub fn change_with<R>(
|
||||
&mut self,
|
||||
cx: &mut AppContext,
|
||||
change: impl FnOnce(&mut MutableSelectionsCollection) -> R,
|
||||
@@ -764,7 +764,7 @@ impl<'a> MutableSelectionsCollection<'a> {
|
||||
|
||||
pub fn replace_cursors_with(
|
||||
&mut self,
|
||||
mut find_replacement_cursors: impl FnMut(&DisplaySnapshot) -> Vec<DisplayPoint>,
|
||||
find_replacement_cursors: impl FnOnce(&DisplaySnapshot) -> Vec<DisplayPoint>,
|
||||
) {
|
||||
let display_map = self.display_map();
|
||||
let new_selections = find_replacement_cursors(&display_map)
|
||||
|
||||
Reference in New Issue
Block a user