Patch 9.0.1049

3 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 12, 2022, 8:49:00 AM12/12/22
to vim...@googlegroups.com

Patch 9.0.1049
Problem: Crash when opening a very small terminal window.
Solution: Instead of crashing fix the cursor position. (closes #11697)
Files: src/libvterm/src/screen.c


*** ../vim-9.0.1048/src/libvterm/src/screen.c 2022-10-17 14:51:31.694963479 +0100
--- src/libvterm/src/screen.c 2022-12-12 13:41:09.099483040 +0000
***************
*** 661,669 ****
}

/* We really expect the cursor position to be set by now */
if(active && (new_cursor.row == -1 || new_cursor.col == -1)) {
! fprintf(stderr, "screen_resize failed to update cursor position\n");
! abort();
}

if(old_row >= 0 && bufidx == BUFIDX_PRIMARY) {
--- 661,675 ----
}

/* We really expect the cursor position to be set by now */
+ /* Unfortunately we do get here when "new_rows" is one. We don't want
+ * to crash, so until the above code is fixed let's just set the cursor. */
if(active && (new_cursor.row == -1 || new_cursor.col == -1)) {
! /* fprintf(stderr, "screen_resize failed to update cursor position\n");
! * abort(); */
! if (new_cursor.row < 0)
! new_cursor.row = 0;
! if (new_cursor.col < 0)
! new_cursor.col = 0;
}

if(old_row >= 0 && bufidx == BUFIDX_PRIMARY) {
*** ../vim-9.0.1048/src/version.c 2022-12-12 13:20:37.622734681 +0000
--- src/version.c 2022-12-12 13:44:23.395252724 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1049,
/**/

--
Facepalm reply #9: "Speed up, you can drive 80 here" "Why, the cars behind us
are also driving 60"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages