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:
14
src/libs/3rdparty/libvterm/src/screen.c
vendored
14
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);
|
new_row_start, new_row_end, old_row_start, old_row_end, width);
|
||||||
#endif
|
#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;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
for(new_row = new_row_start, old_row = old_row_start; new_row <= new_row_end; new_row++) {
|
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;
|
int count = width >= new_cols ? new_cols : width;
|
||||||
@@ -660,8 +667,9 @@ static void resize_buffer(VTermScreen *screen, int bufidx, int new_rows, int new
|
|||||||
|
|
||||||
if(old_row >= 0 && bufidx == BUFIDX_PRIMARY) {
|
if(old_row >= 0 && bufidx == BUFIDX_PRIMARY) {
|
||||||
/* Push spare lines to scrollback buffer */
|
/* Push spare lines to scrollback buffer */
|
||||||
for(int row = 0; row <= old_row; row++)
|
if(screen->callbacks && screen->callbacks->sb_pushline)
|
||||||
sb_pushline_from_row(screen, row);
|
for(int row = 0; row <= old_row; row++)
|
||||||
|
sb_pushline_from_row(screen, row);
|
||||||
if(active)
|
if(active)
|
||||||
statefields->pos.row -= (old_row + 1);
|
statefields->pos.row -= (old_row + 1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user