Fix the double click and update the default settings (#9214)
This commit is contained in:
@@ -38,8 +38,8 @@ pub enum SeedQuerySetting {
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum DoubleClickInMultibuffer {
|
||||
/// Behave as a regular buffer and select the whole word.
|
||||
Select,
|
||||
#[default]
|
||||
Select,
|
||||
/// Open the excerpt clicked as a new buffer in the new tab, if no `alt` modifier was pressed during double click.
|
||||
/// Otherwise, behave as a regular buffer and select the whole word.
|
||||
Open,
|
||||
@@ -145,7 +145,7 @@ pub struct EditorSettingsContent {
|
||||
/// What to do when multibuffer is double clicked in some of its excerpts
|
||||
/// (parts of singleton buffers).
|
||||
///
|
||||
/// Default: open
|
||||
/// Default: select
|
||||
pub double_click_in_multibuffer: Option<DoubleClickInMultibuffer>,
|
||||
}
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ impl EditorElement {
|
||||
return;
|
||||
}
|
||||
|
||||
if click_count == 2 {
|
||||
if click_count == 2 && !editor.buffer().read(cx).is_singleton() {
|
||||
match EditorSettings::get_global(cx).double_click_in_multibuffer {
|
||||
DoubleClickInMultibuffer::Select => {
|
||||
// do nothing special on double click, all selection logic is below
|
||||
|
||||
Reference in New Issue
Block a user