mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
* src/gdb/utils.c (init_page_info): Only call tgetnum function
if rl_get_screen_size did not return useful values.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2013-08-13 Pierre Muller <muller@sourceware.org>
|
||||||
|
|
||||||
|
* src/gdb/utils.c (init_page_info): Only call tgetnum function
|
||||||
|
if rl_get_screen_size did not return useful values.
|
||||||
|
|
||||||
2013-08-12 Ali Anwar <ali_anwar@codesourcery.com>
|
2013-08-12 Ali Anwar <ali_anwar@codesourcery.com>
|
||||||
|
|
||||||
PR breakpoints/15117
|
PR breakpoints/15117
|
||||||
|
14
gdb/utils.c
14
gdb/utils.c
@ -1660,12 +1660,16 @@ init_page_info (void)
|
|||||||
lines_per_page = rows;
|
lines_per_page = rows;
|
||||||
chars_per_line = cols;
|
chars_per_line = cols;
|
||||||
|
|
||||||
/* Readline should have fetched the termcap entry for us. */
|
/* Readline should have fetched the termcap entry for us.
|
||||||
if (tgetnum ("li") < 0 || getenv ("EMACS"))
|
Only try to use tgetnum function if rl_get_screen_size
|
||||||
|
did not return a useful value. */
|
||||||
|
if (((rows <= 0) && (tgetnum ("li") < 0))
|
||||||
|
/* Also disable paging if inside EMACS. */
|
||||||
|
|| getenv ("EMACS"))
|
||||||
{
|
{
|
||||||
/* The number of lines per page is not mentioned in the
|
/* The number of lines per page is not mentioned in the terminal
|
||||||
terminal description. This probably means that paging is
|
description or EMACS evironment variable is set. This probably
|
||||||
not useful (e.g. emacs shell window), so disable paging. */
|
means that paging is not useful, so disable paging. */
|
||||||
lines_per_page = UINT_MAX;
|
lines_per_page = UINT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user