parent
dc4762a69a
commit
1af426bf84
@ -56,6 +56,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
- Have the :opt:`confirm_os_window_close` option also apply when closing tabs
|
- Have the :opt:`confirm_os_window_close` option also apply when closing tabs
|
||||||
with multiple windows (:iss:`2857`)
|
with multiple windows (:iss:`2857`)
|
||||||
|
|
||||||
|
- Add support for legacy DECSET codes 47, 1047 and 1048 (:pull:`2871`)
|
||||||
|
|
||||||
|
|
||||||
0.18.1 [2020-06-23]
|
0.18.1 [2020-06-23]
|
||||||
--------------------
|
--------------------
|
||||||
|
|||||||
@ -67,7 +67,12 @@
|
|||||||
#define MOUSE_SGR_MODE (1006 << 5)
|
#define MOUSE_SGR_MODE (1006 << 5)
|
||||||
#define MOUSE_URXVT_MODE (1015 << 5)
|
#define MOUSE_URXVT_MODE (1015 << 5)
|
||||||
|
|
||||||
|
// Save cursor (DECSC)
|
||||||
|
#define SAVE_CURSOR (1048 << 5)
|
||||||
|
|
||||||
// Alternate screen buffer
|
// Alternate screen buffer
|
||||||
|
#define TOGGLE_ALT_SCREEN_1 (47 << 5)
|
||||||
|
#define TOGGLE_ALT_SCREEN_2 (1047 << 5)
|
||||||
#define ALTERNATE_SCREEN (1049 << 5)
|
#define ALTERNATE_SCREEN (1049 << 5)
|
||||||
|
|
||||||
// Bracketed paste mode
|
// Bracketed paste mode
|
||||||
|
|||||||
@ -137,7 +137,7 @@ static inline Line* range_line_(Screen *self, int y);
|
|||||||
|
|
||||||
void
|
void
|
||||||
screen_reset(Screen *self) {
|
screen_reset(Screen *self) {
|
||||||
if (self->linebuf == self->alt_linebuf) screen_toggle_screen_buffer(self);
|
if (self->linebuf == self->alt_linebuf) screen_toggle_screen_buffer(self, true, true);
|
||||||
if (self->overlay_line.is_active) deactivate_overlay_line(self);
|
if (self->overlay_line.is_active) deactivate_overlay_line(self);
|
||||||
linebuf_clear(self->linebuf, BLANK_CHAR);
|
linebuf_clear(self->linebuf, BLANK_CHAR);
|
||||||
historybuf_clear(self->historybuf);
|
historybuf_clear(self->historybuf);
|
||||||
@ -641,12 +641,12 @@ screen_handle_graphics_command(Screen *self, const GraphicsCommand *cmd, const u
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
screen_toggle_screen_buffer(Screen *self) {
|
screen_toggle_screen_buffer(Screen *self, bool save_cursor, bool clear_alt_screen) {
|
||||||
bool to_alt = self->linebuf == self->main_linebuf;
|
bool to_alt = self->linebuf == self->main_linebuf;
|
||||||
grman_clear(self->alt_grman, true, self->cell_size); // always clear the alt buffer graphics to free up resources, since it has to be cleared when switching back to it anyway
|
grman_clear(self->alt_grman, true, self->cell_size); // always clear the alt buffer graphics to free up resources, since it has to be cleared when switching back to it anyway
|
||||||
if (to_alt) {
|
if (to_alt) {
|
||||||
linebuf_clear(self->alt_linebuf, BLANK_CHAR);
|
if (clear_alt_screen) linebuf_clear(self->alt_linebuf, BLANK_CHAR);
|
||||||
screen_save_cursor(self);
|
if (save_cursor) screen_save_cursor(self);
|
||||||
self->linebuf = self->alt_linebuf;
|
self->linebuf = self->alt_linebuf;
|
||||||
self->tabstops = self->alt_tabstops;
|
self->tabstops = self->alt_tabstops;
|
||||||
self->grman = self->alt_grman;
|
self->grman = self->alt_grman;
|
||||||
@ -655,7 +655,7 @@ screen_toggle_screen_buffer(Screen *self) {
|
|||||||
} else {
|
} else {
|
||||||
self->linebuf = self->main_linebuf;
|
self->linebuf = self->main_linebuf;
|
||||||
self->tabstops = self->main_tabstops;
|
self->tabstops = self->main_tabstops;
|
||||||
screen_restore_cursor(self);
|
if (save_cursor) screen_restore_cursor(self);
|
||||||
self->grman = self->main_grman;
|
self->grman = self->main_grman;
|
||||||
}
|
}
|
||||||
screen_history_scroll(self, SCROLL_FULL, false);
|
screen_history_scroll(self, SCROLL_FULL, false);
|
||||||
@ -727,9 +727,14 @@ set_mode_from_const(Screen *self, unsigned int mode, bool val) {
|
|||||||
case CONTROL_CURSOR_BLINK:
|
case CONTROL_CURSOR_BLINK:
|
||||||
self->cursor->blink = val;
|
self->cursor->blink = val;
|
||||||
break;
|
break;
|
||||||
|
case SAVE_CURSOR:
|
||||||
|
screen_save_cursor(self);
|
||||||
|
break;
|
||||||
|
case TOGGLE_ALT_SCREEN_1:
|
||||||
|
case TOGGLE_ALT_SCREEN_2:
|
||||||
case ALTERNATE_SCREEN:
|
case ALTERNATE_SCREEN:
|
||||||
if (val && self->linebuf == self->main_linebuf) screen_toggle_screen_buffer(self);
|
if (val && self->linebuf == self->main_linebuf) screen_toggle_screen_buffer(self, mode == ALTERNATE_SCREEN, mode == ALTERNATE_SCREEN);
|
||||||
else if (!val && self->linebuf != self->main_linebuf) screen_toggle_screen_buffer(self);
|
else if (!val && self->linebuf != self->main_linebuf) screen_toggle_screen_buffer(self, mode == ALTERNATE_SCREEN, mode == ALTERNATE_SCREEN);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
private = mode >= 1 << 5;
|
private = mode >= 1 << 5;
|
||||||
@ -2394,7 +2399,7 @@ is_main_linebuf(Screen *self, PyObject *a UNUSED) {
|
|||||||
|
|
||||||
static PyObject*
|
static PyObject*
|
||||||
toggle_alt_screen(Screen *self, PyObject *a UNUSED) {
|
toggle_alt_screen(Screen *self, PyObject *a UNUSED) {
|
||||||
screen_toggle_screen_buffer(self);
|
screen_toggle_screen_buffer(self, true, true);
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -138,7 +138,7 @@ void screen_erase_in_line(Screen *, unsigned int, bool);
|
|||||||
void screen_erase_in_display(Screen *, unsigned int, bool);
|
void screen_erase_in_display(Screen *, unsigned int, bool);
|
||||||
void screen_draw(Screen *screen, uint32_t codepoint);
|
void screen_draw(Screen *screen, uint32_t codepoint);
|
||||||
void screen_ensure_bounds(Screen *self, bool use_margins, bool cursor_was_within_margins);
|
void screen_ensure_bounds(Screen *self, bool use_margins, bool cursor_was_within_margins);
|
||||||
void screen_toggle_screen_buffer(Screen *self);
|
void screen_toggle_screen_buffer(Screen *self, bool, bool);
|
||||||
void screen_normal_keypad_mode(Screen *self);
|
void screen_normal_keypad_mode(Screen *self);
|
||||||
void screen_alternate_keypad_mode(Screen *self);
|
void screen_alternate_keypad_mode(Screen *self);
|
||||||
void screen_change_default_color(Screen *self, unsigned int which, uint32_t col);
|
void screen_change_default_color(Screen *self, unsigned int which, uint32_t col);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user