diff --git a/assets/settings/default.json b/assets/settings/default.json index e5cbcd2f9c..1aef3af63b 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -118,8 +118,8 @@ // "bar" // 2. A block that surrounds the following character // "block" - // 3. An underline that runs along the following character - // "underscore" + // 3. An underline / underscore that runs along the following character + // "underline" // 4. A box drawn around the following character // "hollow" // @@ -684,8 +684,8 @@ // "block" // 2. A vertical bar // "bar" - // 3. An underline that runs along the following character - // "underscore" + // 3. An underline / underscore that runs along the following character + // "underline" // 4. A box drawn around the following character // "hollow" // diff --git a/crates/editor/src/editor_settings.rs b/crates/editor/src/editor_settings.rs index 9137629241..f004206b17 100644 --- a/crates/editor/src/editor_settings.rs +++ b/crates/editor/src/editor_settings.rs @@ -179,7 +179,7 @@ pub struct EditorSettingsContent { /// Default: true pub cursor_blink: Option, /// Cursor shape for the default editor. - /// Can be "bar", "block", "underscore", or "hollow". + /// Can be "bar", "block", "underline", or "hollow". /// /// Default: None pub cursor_shape: Option, diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 8a07353547..89fa23ab1c 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -6060,7 +6060,7 @@ impl CursorLayout { origin: self.origin + origin, size: size(self.block_width, self.line_height), }, - CursorShape::Underscore => Bounds { + CursorShape::Underline => Bounds { origin: self.origin + origin + gpui::Point::new(Pixels::ZERO, self.line_height - px(2.0)), diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rs index 13d07caa88..28bbb25d1b 100644 --- a/crates/language/src/buffer.rs +++ b/crates/language/src/buffer.rs @@ -184,7 +184,7 @@ pub enum CursorShape { /// A block that surrounds the following character Block, /// An underline that runs along the following character - Underscore, + Underline, /// A box drawn around the following character Hollow, } diff --git a/crates/language/src/proto.rs b/crates/language/src/proto.rs index 94b720c1fd..a8aa8378b1 100644 --- a/crates/language/src/proto.rs +++ b/crates/language/src/proto.rs @@ -175,7 +175,7 @@ pub fn serialize_cursor_shape(cursor_shape: &CursorShape) -> proto::CursorShape match cursor_shape { CursorShape::Bar => proto::CursorShape::CursorBar, CursorShape::Block => proto::CursorShape::CursorBlock, - CursorShape::Underscore => proto::CursorShape::CursorUnderscore, + CursorShape::Underline => proto::CursorShape::CursorUnderscore, CursorShape::Hollow => proto::CursorShape::CursorHollow, } } @@ -185,7 +185,7 @@ pub fn deserialize_cursor_shape(cursor_shape: proto::CursorShape) -> CursorShape match cursor_shape { proto::CursorShape::CursorBar => CursorShape::Bar, proto::CursorShape::CursorBlock => CursorShape::Block, - proto::CursorShape::CursorUnderscore => CursorShape::Underscore, + proto::CursorShape::CursorUnderscore => CursorShape::Underline, proto::CursorShape::CursorHollow => CursorShape::Hollow, } } diff --git a/crates/terminal/src/terminal_settings.rs b/crates/terminal/src/terminal_settings.rs index 956cde19d9..51b8207f57 100644 --- a/crates/terminal/src/terminal_settings.rs +++ b/crates/terminal/src/terminal_settings.rs @@ -134,7 +134,7 @@ pub struct TerminalSettingsContent { /// Default: {} pub env: Option>, /// Default cursor shape for the terminal. - /// Can be "bar", "block", "underscore", or "hollow". + /// Can be "bar", "block", "underline", or "hollow". /// /// Default: None pub cursor_shape: Option, diff --git a/crates/terminal_view/src/terminal_element.rs b/crates/terminal_view/src/terminal_element.rs index db87fd8dc2..5998caa0da 100644 --- a/crates/terminal_view/src/terminal_element.rs +++ b/crates/terminal_view/src/terminal_element.rs @@ -793,7 +793,7 @@ impl Element for TerminalElement { let (shape, text) = match cursor.shape { AlacCursorShape::Block if !focused => (CursorShape::Hollow, None), AlacCursorShape::Block => (CursorShape::Block, Some(cursor_text)), - AlacCursorShape::Underline => (CursorShape::Underscore, None), + AlacCursorShape::Underline => (CursorShape::Underline, None), AlacCursorShape::Beam => (CursorShape::Bar, None), AlacCursorShape::HollowBlock => (CursorShape::Hollow, None), //This case is handled in the if wrapping the whole cursor layout diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs index 06116bff99..024379e6ac 100644 --- a/crates/vim/src/vim.rs +++ b/crates/vim/src/vim.rs @@ -545,10 +545,10 @@ impl Vim { if self.operator_stack.is_empty() { CursorShape::Block } else { - CursorShape::Underscore + CursorShape::Underline } } - Mode::Replace => CursorShape::Underscore, + Mode::Replace => CursorShape::Underline, Mode::Visual | Mode::VisualLine | Mode::VisualBlock => CursorShape::Block, Mode::Insert => CursorShape::Bar, } diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md index 6740d51364..ce5a6a97ac 100644 --- a/docs/src/configuring-zed.md +++ b/docs/src/configuring-zed.md @@ -371,10 +371,10 @@ List of `string` values "cursor_shape": "block" ``` -3. An underscore that runs along the following character: +3. An underline / underscore that runs along the following character: ```json -"cursor_shape": "underscore" +"cursor_shape": "underline" ``` 4. An box drawn around the following character: