global editor mode setting

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
This commit is contained in:
Smit Barmase 2025-08-21 21:28:04 +05:30
parent 27a26d53b1
commit 0d5becfadf
No known key found for this signature in database
11 changed files with 93 additions and 78 deletions

View file

@ -5,7 +5,7 @@ use schemars::JsonSchema;
use serde::Deserialize;
use settings::Settings;
use std::cmp;
use vim_mode_setting::HelixModeSetting;
use vim_mode_setting::{EditorMode, EditorModeSetting};
use crate::{
Vim,
@ -220,7 +220,7 @@ impl Vim {
});
});
if HelixModeSetting::get_global(cx).0 {
if EditorModeSetting::get_global(cx).0 == EditorMode::Helix {
self.switch_mode(Mode::HelixNormal, true, window, cx);
} else {
self.switch_mode(Mode::Normal, true, window, cx);