Patch 9.0.1641
Problem: The log file does not give information about window sizes.
Solution: Add a few log messages about obtaining the window size.
Files: src/os_unix.c
*** ../vim-9.0.1640/src/os_unix.c 2023-05-20 16:39:03.337433572 +0100
--- src/os_unix.c 2023-06-21 13:29:00.975724835 +0100
***************
*** 444,450 ****
--- 444,453 ----
if (check_only)
return do_resize;
while (do_resize)
+ {
+ ch_log(NULL, "calling handle_resize() in resize_func()");
handle_resize();
+ }
return FALSE;
}
***************
*** 4166,4171 ****
--- 4169,4175 ----
{
columns = ws.ws_col;
rows = ws.ws_row;
+ ch_log(NULL, "Got size with TIOCGWINSZ: %ld x %ld", columns, rows);
}
}
# else // TIOCGWINSZ
***************
*** 4181,4186 ****
--- 4185,4191 ----
{
columns = ts.ts_cols;
rows = ts.ts_lines;
+ ch_log(NULL, "Got size with TIOCGSIZE: %ld x %ld", columns, rows);
}
}
# endif // TIOCGSIZE
***************
*** 4194,4202 ****
--- 4199,4213 ----
if (columns == 0 || rows == 0 || vim_strchr(p_cpo, CPO_TSIZE) != NULL)
{
if ((p = (char_u *)getenv("LINES")))
+ {
rows = atoi((char *)p);
+ ch_log(NULL, "Got 'lines' from $LINES: %ld", rows);
+ }
if ((p = (char_u *)getenv("COLUMNS")))
+ {
columns = atoi((char *)p);
+ ch_log(NULL, "Got 'columns' from $COLUMNS: %ld", columns);
+ }
}
#ifdef HAVE_TGETENT
***************
*** 4204,4210 ****
--- 4215,4224 ----
* 3. try reading "co" and "li" entries from termcap
*/
if (columns == 0 || rows == 0)
+ {
getlinecol(&columns, &rows);
+ ch_log(NULL, "Got size from termcap: %ld x %ld", columns, rows);
+ }
#endif
/*
***************
*** 4241,4256 ****
ws.ws_xpixel = cols * 5;
ws.ws_ypixel = rows * 10;
retval = ioctl(tty_fd, TIOCSWINSZ, &ws);
! ch_log(NULL, "ioctl(TIOCSWINSZ) %s",
! retval == 0 ? "success" : "failed");
# elif defined(TIOCSSIZE)
struct ttysize ts;
ts.ts_cols = cols;
ts.ts_lines = rows;
retval = ioctl(tty_fd, TIOCSSIZE, &ts);
! ch_log(NULL, "ioctl(TIOCSSIZE) %s",
! retval == 0 ? "success" : "failed");
# endif
if (tty_fd != fd)
close(tty_fd);
--- 4255,4268 ----
ws.ws_xpixel = cols * 5;
ws.ws_ypixel = rows * 10;
retval = ioctl(tty_fd, TIOCSWINSZ, &ws);
! ch_log(NULL, "ioctl(TIOCSWINSZ) %s", retval == 0 ? "success" : "failed");
# elif defined(TIOCSSIZE)
struct ttysize ts;
ts.ts_cols = cols;
ts.ts_lines = rows;
retval = ioctl(tty_fd, TIOCSSIZE, &ts);
! ch_log(NULL, "ioctl(TIOCSSIZE) %s", retval == 0 ? "success" : "failed");
# endif
if (tty_fd != fd)
close(tty_fd);
***************
*** 6506,6512 ****
--- 6518,6527 ----
// Check whether window has been resized, EINTR may be caused by
// SIGWINCH.
if (do_resize)
+ {
+ ch_log(NULL, "calling handle_resize() in RealWaitForChar()");
handle_resize();
+ }
// Interrupted by a signal, need to try again. We ignore msec
// here, because we do want to check even after a timeout if
*** ../vim-9.0.1640/src/version.c 2023-06-17 16:19:26.906881209 +0100
--- src/version.c 2023-06-21 13:09:56.365247695 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1641,
/**/
--
hundred-and-one symptoms of being an internet addict:
197. Your desk collapses under the weight of your computer peripherals.
/// 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 ///