mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Fix #7752
This commit is contained in:
@@ -81,6 +81,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- MacOS Intel: Fix a crash in the choose-fonts kitten when displaying previews of variable fonts (:iss:`7734`)
|
- MacOS Intel: Fix a crash in the choose-fonts kitten when displaying previews of variable fonts (:iss:`7734`)
|
||||||
|
|
||||||
|
- Remote control: Fix a regression causing an escape code to leak when using @ launch with ``--no-response`` over the TTY (:iss:`7752`)
|
||||||
|
|
||||||
0.36.0 [2024-08-17]
|
0.36.0 [2024-08-17]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,11 @@ func is_stream_response(serialized_response []byte) bool {
|
|||||||
|
|
||||||
func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error) {
|
func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error) {
|
||||||
serialized_response = make([]byte, 0)
|
serialized_response = make([]byte, 0)
|
||||||
lp, err := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors)
|
// we cant do inbandresize notification as in the --no-response case the
|
||||||
|
// command can cause a resize and the loop can quit before the notification
|
||||||
|
// arrives, leading to the notification being sent to whatever is executed
|
||||||
|
// after us.
|
||||||
|
lp, err := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors, loop.NoInBandResizeNotifications)
|
||||||
if io_data.on_key_event != nil {
|
if io_data.on_key_event != nil {
|
||||||
lp.FullKeyboardProtocol()
|
lp.FullKeyboardProtocol()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -196,6 +196,10 @@ func NoRestoreColors(self *Loop) {
|
|||||||
self.terminal_options.restore_colors = false
|
self.terminal_options.restore_colors = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NoInBandResizeNotifications(self *Loop) {
|
||||||
|
self.terminal_options.in_band_resize_notification = false
|
||||||
|
}
|
||||||
|
|
||||||
func (self *Loop) DeathSignalName() string {
|
func (self *Loop) DeathSignalName() string {
|
||||||
if self.death_signal != SIGNULL {
|
if self.death_signal != SIGNULL {
|
||||||
return self.death_signal.String()
|
return self.death_signal.String()
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ func new_loop() *Loop {
|
|||||||
l := Loop{controlling_term: nil}
|
l := Loop{controlling_term: nil}
|
||||||
l.terminal_options.Alternate_screen = true
|
l.terminal_options.Alternate_screen = true
|
||||||
l.terminal_options.restore_colors = true
|
l.terminal_options.restore_colors = true
|
||||||
|
l.terminal_options.in_band_resize_notification = true
|
||||||
l.terminal_options.kitty_keyboard_mode = DISAMBIGUATE_KEYS | REPORT_ALTERNATE_KEYS | REPORT_ALL_KEYS_AS_ESCAPE_CODES | REPORT_TEXT_WITH_KEYS
|
l.terminal_options.kitty_keyboard_mode = DISAMBIGUATE_KEYS | REPORT_ALTERNATE_KEYS | REPORT_ALL_KEYS_AS_ESCAPE_CODES | REPORT_TEXT_WITH_KEYS
|
||||||
l.escape_code_parser.HandleCSI = l.handle_csi
|
l.escape_code_parser.HandleCSI = l.handle_csi
|
||||||
l.escape_code_parser.HandleOSC = l.handle_osc
|
l.escape_code_parser.HandleOSC = l.handle_osc
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ type TerminalStateOptions struct {
|
|||||||
Alternate_screen, restore_colors bool
|
Alternate_screen, restore_colors bool
|
||||||
mouse_tracking MouseTracking
|
mouse_tracking MouseTracking
|
||||||
kitty_keyboard_mode KeyboardStateBits
|
kitty_keyboard_mode KeyboardStateBits
|
||||||
|
in_band_resize_notification bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func set_modes(sb *strings.Builder, modes ...Mode) {
|
func set_modes(sb *strings.Builder, modes ...Mode) {
|
||||||
@@ -128,7 +129,10 @@ func (self *TerminalStateOptions) SetStateEscapeCodes() string {
|
|||||||
reset_modes(&sb,
|
reset_modes(&sb,
|
||||||
IRM, DECKM, DECSCNM, BRACKETED_PASTE, FOCUS_TRACKING,
|
IRM, DECKM, DECSCNM, BRACKETED_PASTE, FOCUS_TRACKING,
|
||||||
MOUSE_BUTTON_TRACKING, MOUSE_MOTION_TRACKING, MOUSE_MOVE_TRACKING, MOUSE_UTF8_MODE, MOUSE_SGR_MODE)
|
MOUSE_BUTTON_TRACKING, MOUSE_MOTION_TRACKING, MOUSE_MOVE_TRACKING, MOUSE_UTF8_MODE, MOUSE_SGR_MODE)
|
||||||
set_modes(&sb, DECARM, DECAWM, DECTCEM, INBAND_RESIZE_NOTIFICATION)
|
set_modes(&sb, DECARM, DECAWM, DECTCEM)
|
||||||
|
if self.in_band_resize_notification {
|
||||||
|
set_modes(&sb, INBAND_RESIZE_NOTIFICATION)
|
||||||
|
}
|
||||||
if self.Alternate_screen {
|
if self.Alternate_screen {
|
||||||
set_modes(&sb, ALTERNATE_SCREEN)
|
set_modes(&sb, ALTERNATE_SCREEN)
|
||||||
sb.WriteString(CLEAR_SCREEN)
|
sb.WriteString(CLEAR_SCREEN)
|
||||||
|
|||||||
Reference in New Issue
Block a user