Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion crates/editor/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16207,6 +16207,7 @@ impl Editor {
let Some(end) = multibuffer.buffer_point_to_anchor(&buffer, range.end, cx) else {
return;
};

self.change_selections(
SelectionEffects::default().nav_history(true),
window,
Expand Down Expand Up @@ -16921,7 +16922,15 @@ impl Editor {

editor.update_in(cx, |editor, window, cx| {
let range = target_range.to_point(target_buffer.read(cx));
let range = editor.range_for_match(&range, false);

// When vim mode is enabled, ensure that the range is
// collapsed to the range's start point, otherwise actions
// like jumping to a function's definition in vim mode would
// change the mode to Visual.
let range = match vim_flavor(cx) {
Some(_) => editor.range_for_match(&range, true),
None => editor.range_for_match(&range, false),
};
let range = collapse_multiline_range(range);

if !split
Expand Down
Loading