Skip to content

Commit be90974

Browse files
committed
hide vim_enabled a bit...
1 parent 283a61d commit be90974

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

crates/editor/src/editor.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,7 +2385,10 @@ impl Editor {
23852385
}
23862386
}
23872387
EditorEvent::Edited { .. } => {
2388-
if !vim_enabled(cx) {
2388+
let vim_mode = vim_mode_setting::VimModeSetting::try_get(cx)
2389+
.map(|vim_mode| vim_mode.0)
2390+
.unwrap_or(false);
2391+
if !vim_mode {
23892392
let display_map = editor.display_snapshot(cx);
23902393
let selections = editor.selections.all_adjusted_display(&display_map);
23912394
let pop_state = editor
@@ -21762,7 +21765,9 @@ impl Editor {
2176221765
.and_then(|e| e.to_str())
2176321766
.map(|a| a.to_string()));
2176421767

21765-
let vim_mode = vim_enabled(cx);
21768+
let vim_mode = vim_mode_setting::VimModeSetting::try_get(cx)
21769+
.map(|vim_mode| vim_mode.0)
21770+
.unwrap_or(false);
2176621771

2176721772
let edit_predictions_provider = all_language_settings(file, cx).edit_predictions.provider;
2176821773
let copilot_enabled = edit_predictions_provider
@@ -22397,12 +22402,6 @@ fn edit_for_markdown_paste<'a>(
2239722402
(range, new_text)
2239822403
}
2239922404

22400-
fn vim_enabled(cx: &App) -> bool {
22401-
vim_mode_setting::VimModeSetting::try_get(cx)
22402-
.map(|vim_mode| vim_mode.0)
22403-
.unwrap_or(false)
22404-
}
22405-
2240622405
fn process_completion_for_edit(
2240722406
completion: &Completion,
2240822407
intent: CompletionIntent,

crates/search/src/project_search.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use editor::{
1212
SelectionEffects,
1313
actions::{Backtab, SelectAll, Tab},
1414
items::active_match_index,
15-
multibuffer_context_lines, multibuffer_context_lines,
1615
scroll::Autoscroll,
1716
};
1817
use futures::{StreamExt, stream::FuturesOrdered};

0 commit comments

Comments
 (0)