mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 9.0.1641: the log file does not give information about window sizes
Problem: The log file does not give information about window sizes. Solution: Add a few log messages about obtaining the window size.
This commit is contained in:
@@ -444,7 +444,10 @@ resize_func(int check_only)
|
|||||||
if (check_only)
|
if (check_only)
|
||||||
return do_resize;
|
return do_resize;
|
||||||
while (do_resize)
|
while (do_resize)
|
||||||
|
{
|
||||||
|
ch_log(NULL, "calling handle_resize() in resize_func()");
|
||||||
handle_resize();
|
handle_resize();
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4166,6 +4169,7 @@ mch_get_shellsize(void)
|
|||||||
{
|
{
|
||||||
columns = ws.ws_col;
|
columns = ws.ws_col;
|
||||||
rows = ws.ws_row;
|
rows = ws.ws_row;
|
||||||
|
ch_log(NULL, "Got size with TIOCGWINSZ: %ld x %ld", columns, rows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# else // TIOCGWINSZ
|
# else // TIOCGWINSZ
|
||||||
@@ -4181,6 +4185,7 @@ mch_get_shellsize(void)
|
|||||||
{
|
{
|
||||||
columns = ts.ts_cols;
|
columns = ts.ts_cols;
|
||||||
rows = ts.ts_lines;
|
rows = ts.ts_lines;
|
||||||
|
ch_log(NULL, "Got size with TIOCGSIZE: %ld x %ld", columns, rows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif // TIOCGSIZE
|
# endif // TIOCGSIZE
|
||||||
@@ -4194,9 +4199,15 @@ mch_get_shellsize(void)
|
|||||||
if (columns == 0 || rows == 0 || vim_strchr(p_cpo, CPO_TSIZE) != NULL)
|
if (columns == 0 || rows == 0 || vim_strchr(p_cpo, CPO_TSIZE) != NULL)
|
||||||
{
|
{
|
||||||
if ((p = (char_u *)getenv("LINES")))
|
if ((p = (char_u *)getenv("LINES")))
|
||||||
|
{
|
||||||
rows = atoi((char *)p);
|
rows = atoi((char *)p);
|
||||||
|
ch_log(NULL, "Got 'lines' from $LINES: %ld", rows);
|
||||||
|
}
|
||||||
if ((p = (char_u *)getenv("COLUMNS")))
|
if ((p = (char_u *)getenv("COLUMNS")))
|
||||||
|
{
|
||||||
columns = atoi((char *)p);
|
columns = atoi((char *)p);
|
||||||
|
ch_log(NULL, "Got 'columns' from $COLUMNS: %ld", columns);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_TGETENT
|
#ifdef HAVE_TGETENT
|
||||||
@@ -4204,7 +4215,10 @@ mch_get_shellsize(void)
|
|||||||
* 3. try reading "co" and "li" entries from termcap
|
* 3. try reading "co" and "li" entries from termcap
|
||||||
*/
|
*/
|
||||||
if (columns == 0 || rows == 0)
|
if (columns == 0 || rows == 0)
|
||||||
|
{
|
||||||
getlinecol(&columns, &rows);
|
getlinecol(&columns, &rows);
|
||||||
|
ch_log(NULL, "Got size from termcap: %ld x %ld", columns, rows);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -4241,16 +4255,14 @@ mch_report_winsize(int fd, int rows, int cols)
|
|||||||
ws.ws_xpixel = cols * 5;
|
ws.ws_xpixel = cols * 5;
|
||||||
ws.ws_ypixel = rows * 10;
|
ws.ws_ypixel = rows * 10;
|
||||||
retval = ioctl(tty_fd, TIOCSWINSZ, &ws);
|
retval = ioctl(tty_fd, TIOCSWINSZ, &ws);
|
||||||
ch_log(NULL, "ioctl(TIOCSWINSZ) %s",
|
ch_log(NULL, "ioctl(TIOCSWINSZ) %s", retval == 0 ? "success" : "failed");
|
||||||
retval == 0 ? "success" : "failed");
|
|
||||||
# elif defined(TIOCSSIZE)
|
# elif defined(TIOCSSIZE)
|
||||||
struct ttysize ts;
|
struct ttysize ts;
|
||||||
|
|
||||||
ts.ts_cols = cols;
|
ts.ts_cols = cols;
|
||||||
ts.ts_lines = rows;
|
ts.ts_lines = rows;
|
||||||
retval = ioctl(tty_fd, TIOCSSIZE, &ts);
|
retval = ioctl(tty_fd, TIOCSSIZE, &ts);
|
||||||
ch_log(NULL, "ioctl(TIOCSSIZE) %s",
|
ch_log(NULL, "ioctl(TIOCSSIZE) %s", retval == 0 ? "success" : "failed");
|
||||||
retval == 0 ? "success" : "failed");
|
|
||||||
# endif
|
# endif
|
||||||
if (tty_fd != fd)
|
if (tty_fd != fd)
|
||||||
close(tty_fd);
|
close(tty_fd);
|
||||||
@@ -6506,7 +6518,10 @@ select_eintr:
|
|||||||
// Check whether window has been resized, EINTR may be caused by
|
// Check whether window has been resized, EINTR may be caused by
|
||||||
// SIGWINCH.
|
// SIGWINCH.
|
||||||
if (do_resize)
|
if (do_resize)
|
||||||
|
{
|
||||||
|
ch_log(NULL, "calling handle_resize() in RealWaitForChar()");
|
||||||
handle_resize();
|
handle_resize();
|
||||||
|
}
|
||||||
|
|
||||||
// Interrupted by a signal, need to try again. We ignore msec
|
// Interrupted by a signal, need to try again. We ignore msec
|
||||||
// here, because we do want to check even after a timeout if
|
// here, because we do want to check even after a timeout if
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1641,
|
||||||
/**/
|
/**/
|
||||||
1640,
|
1640,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user