vim: Fix cursor shape after deactivation (#42834)

Update the `Vim.deactivate` method to ensure that the cursor shape is
reset to the one available in the user's settings, in the `cursor_shape`
setting, instead of simply defaulting to `CursorShape::Bar`.

In order to test this behavior, the `Editor.cursor_shape` method was
also introduced.

Release Notes:

- Fixed the cursor shape reset in vim mode deactivation, ensuring that
the user's `cursor_shape` setting is used

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
This commit is contained in:
Lennart
2025-11-24 21:31:20 +00:00
committed by GitHub
co-authored by dino
parent 342eba6f22
commit 769464762a
3 changed files with 35 additions and 2 deletions
+4
View File
@@ -3025,6 +3025,10 @@ impl Editor {
cx.notify();
}
pub fn cursor_shape(&self) -> CursorShape {
self.cursor_shape
}
pub fn set_current_line_highlight(
&mut self,
current_line_highlight: Option<CurrentLineHighlight>,