aboutsummaryrefslogtreecommitdiff
path: root/readline
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1994-01-16 04:04:13 +0000
committerPer Bothner <per@bothner.com>1994-01-16 04:04:13 +0000
commit44af5659d7a674b5901a8a3baf1a9cca48a37f54 (patch)
tree4b4fe9789c96cf9a64c73bf7b0c7526a88788e79 /readline
parentd7a5ff3c82a728ed75c654a9e53e26ecd9e1fae3 (diff)
downloadgdb-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')
-rw-r--r--readline/ChangeLog3
-rw-r--r--readline/readline.c14
2 files changed, 14 insertions, 3 deletions
diff --git a/readline/ChangeLog b/readline/ChangeLog
index 1aa1e98..48ed69d 100644
--- a/readline/ChangeLog
+++ b/readline/ChangeLog
@@ -1,5 +1,8 @@
Sat Jan 15 19:36:12 1994 Per Bothner (bothner@kalessin.cygnus.com)
+ * readline.c, display.c: Patches to allow use of all 80
+ columns on most terminals (those with am and xn).
+
Merge in changes from bash-1.13. The most obvious one is
that the file readline.c has been split into multiple files.
* bind.c, complete.c, dispay.c, isearch.c, parens.c, rldefs.h,
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);