Skip to content

Commit

Permalink
Merge branch 'feat/vim_highlight_on_copy_config' of github.com:RustyD…
Browse files Browse the repository at this point in the history
…ev69/zed into feat/vim_highlight_on_copy_config
  • Loading branch information
RustyDev24 committed Dec 3, 2024
2 parents fb50fe4 + 455cfd9 commit 51f57d8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/settings/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@
"use_system_clipboard": "always",
"use_multiline_find": false,
"use_smartcase_find": false,
"highlight_on_copy_duration": 200,
"highlight_on_yank_duration": 200,
"custom_digraphs": {}
},
// The server to connect to. If the environment variable
Expand Down
2 changes: 1 addition & 1 deletion crates/vim/src/normal/yank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl Vim {
)
});

let highlight_duration = VimSettings::get_global(cx).highlight_on_copy_duration;
let highlight_duration = VimSettings::get_global(cx).highlight_on_yank_duration;
if !is_yank || self.mode == Mode::Visual || highlight_duration == 0 {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions crates/vim/src/vim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ struct VimSettings {
pub use_multiline_find: bool,
pub use_smartcase_find: bool,
pub custom_digraphs: HashMap<String, Arc<str>>,
pub highlight_on_copy_duration: u64,
pub highlight_on_yank_duration: u64,
}

#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
Expand All @@ -1198,7 +1198,7 @@ struct VimSettingsContent {
pub use_multiline_find: Option<bool>,
pub use_smartcase_find: Option<bool>,
pub custom_digraphs: Option<HashMap<String, Arc<str>>>,
pub highlight_on_copy_duration: Option<u64>,
pub highlight_on_yank_duration: Option<u64>,
}

impl Settings for VimSettings {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/vim.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ Here's an example of these settings changed:
"use_multiline_find": true,
"use_smartcase_find": true,
"toggle_relative_line_numbers": true,
"highlight_on_copy_duration": 50,
"highlight_on_yank_duration": 50,
"custom_digraphs": {
"fz": "🧟‍♀️"
}
Expand Down

0 comments on commit 51f57d8

Please sign in to comment.