vim: set cursor to hollow-block if editor loses focus (#10995)

This has been bugging me for a while now. Finally figured out how to do
it.

Release Notes:

- Fixed cursor in Vim mode not changing into a hollow block when editor
loses focus.


Demo: 


https://github.com/zed-industries/zed/assets/1185253/c7585282-156d-4ab2-b516-eb1940d6d0d3
This commit is contained in:
Thorsten Ball 2024-04-25 17:56:53 +02:00 committed by GitHub
parent 3ce4ff94ae
commit 0d6fb08b67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,6 +51,9 @@ fn blurred(editor: View<Editor>, cx: &mut WindowContext) {
vim.clear_operator(cx);
}
}
editor.update(cx, |editor, cx| {
editor.set_cursor_shape(language::CursorShape::Hollow, cx);
});
});
}