diff options
author | Per Bothner <per@bothner.com> | 1994-01-16 04:04:13 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1994-01-16 04:04:13 +0000 |
commit | 44af5659d7a674b5901a8a3baf1a9cca48a37f54 (patch) | |
tree | 4b4fe9789c96cf9a64c73bf7b0c7526a88788e79 /readline/readline.c | |
parent | d7a5ff3c82a728ed75c654a9e53e26ecd9e1fae3 (diff) | |
download | gdb-44af5659d7a674b5901a8a3baf1a9cca48a37f54.zip gdb-44af5659d7a674b5901a8a3baf1a9cca48a37f54.tar.gz gdb-44af5659d7a674b5901a8a3baf1a9cca48a37f54.tar.bz2 |
* readline.c, display.c: Patches to allow use of all 80
columns on most terminals (those with am and xn).
Diffstat (limited to 'readline/readline.c')
-rw-r--r-- | readline/readline.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/readline/readline.c b/readline/readline.c index 7e5a820..00af9d6 100644 --- a/readline/readline.c +++ b/readline/readline.c @@ -1064,6 +1064,9 @@ char *term_forward_char; /* How to go up a line. */ char *term_up; +/* True if we have funny auto-line-wrap ("am" and "xn"). */ +int term_xn; + /* A visible bell, if the terminal can be made to flash the screen. */ char *visible_bell; @@ -1146,7 +1149,10 @@ _rl_set_screen_size (tty, ignore_env) set_lines_and_columns (screenheight, screenwidth); #endif - screenwidth--; + /* If we don't have xn (most modern terminals do), + don't use the last column. */ + if (!term_xn) + screenwidth--; } init_terminal_io (terminal_name) @@ -1169,7 +1175,7 @@ init_terminal_io (terminal_name) #if defined (HACK_TERMCAP_MOTION) term_forward_char = (char *)NULL; #endif - terminal_can_insert = 0; + terminal_can_insert = term_xn = 0; return; #else /* !__GO32__ */ char *term, *buffer; @@ -1202,7 +1208,7 @@ init_terminal_io (terminal_name) #if defined (HACK_TERMCAP_MOTION) term_forward_char = (char *)NULL; #endif - terminal_can_insert = 0; + terminal_can_insert = term_xn = 0; return; } @@ -1229,6 +1235,8 @@ init_terminal_io (terminal_name) screenwidth = screenheight = 0; + term_xn = tgetflag ("am", &buffer) && tgetflag ("xn", &buffer); + _rl_set_screen_size (tty, 0); term_im = tgetstr ("im", &buffer); |