mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 14:34:52 +02:00
Fix --hold always restoring cursor to block shape instead of respecting the value of cursor_shape
This commit is contained in:
@@ -618,6 +618,7 @@ parse_kitty_dcs(PS *self, uint8_t *buf, size_t bufsz) {
|
||||
dispatch("ask|", handle_remote_askpass, 0)
|
||||
dispatch("clone|", handle_remote_clone, 0)
|
||||
dispatch("edit|", handle_remote_edit, 0)
|
||||
dispatch("restore-cursor-appearance|", handle_restore_cursor_appearance, 0)
|
||||
|
||||
return false;
|
||||
#undef dispatch
|
||||
|
||||
@@ -1524,6 +1524,13 @@ class Window:
|
||||
text = process_remote_print(msg)
|
||||
print(text, end='', flush=True)
|
||||
|
||||
def handle_restore_cursor_appearance(self, msg: memoryview | None = None) -> None:
|
||||
opts = get_options()
|
||||
self.screen.cursor.blink = opts.cursor_blink_interval[0] != 0
|
||||
self.screen.cursor.shape = opts.cursor_shape
|
||||
self.screen.cursor_visible = True
|
||||
delattr(self.screen.color_profile, 'cursor_color')
|
||||
|
||||
def send_cmd_response(self, response: Any) -> None:
|
||||
self.screen.send_escape_code_to_child(ESC_DCS, '@kitty-cmd' + json.dumps(response))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user