mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Fix resizing window when alternate screen is active does not preserve trailing blank output line in the main screen
Fixes #7978
This commit is contained in:
parent
ccb5bfd372
commit
9d1a3e5b44
2 changed files with 4 additions and 0 deletions
|
|
@ -87,6 +87,8 @@ Detailed list of changes
|
|||
|
||||
- :opt:`tab_title_template` allow using the 256 terminal colors for formatting (:disc:`7976`)
|
||||
|
||||
- Fix resizing window when alternate screen is active does not preserve trailing blank output line in the main screen (:iss:`7978`)
|
||||
|
||||
0.36.4 [2024-09-27]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
|
|
@ -373,6 +373,7 @@ screen_resize(Screen *self, unsigned int lines, unsigned int columns) {
|
|||
index_type num_content_lines_before, num_content_lines_after;
|
||||
bool dummy_output_inserted = false;
|
||||
if (is_main) dummy_output_inserted = preserve_blank_output_start_line(self->cursor, self->linebuf);
|
||||
else if (self->main_savepoint.is_valid) dummy_output_inserted = preserve_blank_output_start_line(&self->main_savepoint.cursor, self->main_linebuf);
|
||||
unsigned int lines_after_cursor_before_resize = self->lines - self->cursor->y;
|
||||
CursorTrack cursor = {.before = {self->cursor->x, self->cursor->y}};
|
||||
CursorTrack main_saved_cursor = {.before = {self->main_savepoint.cursor.x, self->main_savepoint.cursor.y}};
|
||||
|
|
@ -452,6 +453,7 @@ screen_resize(Screen *self, unsigned int lines, unsigned int columns) {
|
|||
}
|
||||
if (dummy_output_inserted) {
|
||||
if (is_main) remove_blank_output_line_reservation_marker(self->cursor, self->linebuf);
|
||||
else remove_blank_output_line_reservation_marker(&self->main_savepoint.cursor, self->main_linebuf);
|
||||
}
|
||||
if (num_of_prompt_lines) {
|
||||
// Copy the old prompt lines without any reflow this prevents
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue