forked from qt-creator/qt-creator
LibVTerm: Integrate upstream changes
Change-Id: I9636eead9f9426f4d7754af8dede19956bc1fb8c Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
10
src/libs/3rdparty/libvterm/src/screen.c
vendored
10
src/libs/3rdparty/libvterm/src/screen.c
vendored
@@ -595,8 +595,15 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new
|
||||
new_row_start, new_row_end, old_row_start, old_row_end, width);
|
||||
#endif
|
||||
|
||||
if(new_row_start < 0)
|
||||
if(new_row_start < 0) {
|
||||
if(old_row_start <= old_cursor.row && old_cursor.row < old_row_end) {
|
||||
new_cursor.row = 0;
|
||||
new_cursor.col = old_cursor.col;
|
||||
if(new_cursor.col >= new_cols)
|
||||
new_cursor.col = new_cols-1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for(new_row = new_row_start, old_row = old_row_start; new_row <= new_row_end; new_row++) {
|
||||
int count = width >= new_cols ? new_cols : width;
|
||||
@@ -660,6 +667,7 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new
|
||||
|
||||
if(old_row >= 0 && bufidx == BUFIDX_PRIMARY) {
|
||||
/* Push spare lines to scrollback buffer */
|
||||
if(screen->callbacks && screen->callbacks->sb_pushline)
|
||||
for(int row = 0; row <= old_row; row++)
|
||||
sb_pushline_from_row(screen, row);
|
||||
if(active)
|
||||
|
Reference in New Issue
Block a user