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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221212134855.1D3D01C059C%40moolenaar.net.

Raspunde prin e-mail lui