Standardize on CursorShape::Underline not Underscore (#19028)

Currently terminal.cursor_shape uses `underline` and `cursor_shape` uses
`underscore`.
This standardizes them so they use the same settings value.

I think `underline` is the more common term and it matches the
terminology used by VSCode, Alacritty, iTerm, etc.

Note the protobuf enum `CursorShape::CursorUnderscore` remains
unchanged.

See also:
- https://github.com/zed-industries/zed/pull/18530
- https://github.com/zed-industries/zed/pull/17572

Release Notes:

- Settings: rename one `cursor_shape` from `underscore` to `underline`
(breaking change).
This commit is contained in:
Peter Tripp 2024-10-11 04:44:21 -04:00 committed by GitHub
parent 36b9e40085
commit 4726f30bd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 15 additions and 15 deletions

View file

@ -179,7 +179,7 @@ pub struct EditorSettingsContent {
/// Default: true
pub cursor_blink: Option<bool>,
/// 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<CursorShape>,

View file

@ -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)),