summaryrefslogtreecommitdiff
path: root/lib/readline
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline')
-rw-r--r--lib/readline/display.c7
-rw-r--r--lib/readline/doc/history.texi2
-rw-r--r--lib/readline/doc/hstech.texi2
-rw-r--r--lib/readline/doc/hsuser.texi2
-rw-r--r--lib/readline/doc/rlman.texi2
-rw-r--r--lib/readline/doc/rltech.texi2
-rw-r--r--lib/readline/doc/rluser.texi16
-rw-r--r--lib/readline/doc/rluserman.texi2
-rw-r--r--lib/readline/doc/version.texi8
-rw-r--r--lib/readline/histexpand.c2
-rw-r--r--lib/readline/parse-colors.c20
-rw-r--r--lib/readline/search.c5
-rw-r--r--lib/readline/signals.c2
-rw-r--r--lib/readline/undo.c13
14 files changed, 61 insertions, 24 deletions
diff --git a/lib/readline/display.c b/lib/readline/display.c
index 8f04b3a2..913e0da0 100644
--- a/lib/readline/display.c
+++ b/lib/readline/display.c
@@ -748,10 +748,9 @@ rl_redisplay ()
/* Now account for invisible characters in the current line. */
/* XXX - this assumes that the invisible characters may be split, but only
between the first and the last lines. */
- temp += ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
- : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line))
- : ((newlines == 0) ? wrap_offset : 0));
-
+ temp += (newlines == 0) ? prompt_invis_chars_first_line
+ : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line);
+
inv_lbreaks[++newlines] = temp;
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
diff --git a/lib/readline/doc/history.texi b/lib/readline/doc/history.texi
index afbb6db6..a991fe5b 100644
--- a/lib/readline/doc/history.texi
+++ b/lib/readline/doc/history.texi
@@ -12,7 +12,7 @@ This document describes the GNU History library
a programming tool that provides a consistent user interface for
recalling lines of previously typed input.
-Copyright @copyright{} 1988--2012 Free Software Foundation, Inc.
+Copyright @copyright{} 1988--2014 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/lib/readline/doc/hstech.texi b/lib/readline/doc/hstech.texi
index a87974bc..6487f20b 100644
--- a/lib/readline/doc/hstech.texi
+++ b/lib/readline/doc/hstech.texi
@@ -1,7 +1,7 @@
@ignore
This file documents the user interface to the GNU History library.
-Copyright (C) 1988-2012 Free Software Foundation, Inc.
+Copyright (C) 1988-2014 Free Software Foundation, Inc.
Authored by Brian Fox and Chet Ramey.
Permission is granted to make and distribute verbatim copies of this manual
diff --git a/lib/readline/doc/hsuser.texi b/lib/readline/doc/hsuser.texi
index c398787b..69a50163 100644
--- a/lib/readline/doc/hsuser.texi
+++ b/lib/readline/doc/hsuser.texi
@@ -1,7 +1,7 @@
@ignore
This file documents the user interface to the GNU History library.
-Copyright (C) 1988--2012 Free Software Foundation, Inc.
+Copyright (C) 1988--2014 Free Software Foundation, Inc.
Authored by Brian Fox and Chet Ramey.
Permission is granted to make and distribute verbatim copies of this manual
diff --git a/lib/readline/doc/rlman.texi b/lib/readline/doc/rlman.texi
index 7dc9611b..17a8292b 100644
--- a/lib/readline/doc/rlman.texi
+++ b/lib/readline/doc/rlman.texi
@@ -13,7 +13,7 @@ This manual describes the GNU Readline Library
consistency of user interface across discrete programs which provide
a command line interface.
-Copyright @copyright{} 1988--2012 Free Software Foundation, Inc.
+Copyright @copyright{} 1988--2014 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/lib/readline/doc/rltech.texi b/lib/readline/doc/rltech.texi
index 5bfde171..178296be 100644
--- a/lib/readline/doc/rltech.texi
+++ b/lib/readline/doc/rltech.texi
@@ -7,7 +7,7 @@ This document describes the GNU Readline Library, a utility for aiding
in the consistency of user interface across discrete programs that need
to provide a command line interface.
-Copyright (C) 1988--2012 Free Software Foundation, Inc.
+Copyright (C) 1988--2014 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
diff --git a/lib/readline/doc/rluser.texi b/lib/readline/doc/rluser.texi
index 1b5654f8..9c915242 100644
--- a/lib/readline/doc/rluser.texi
+++ b/lib/readline/doc/rluser.texi
@@ -9,7 +9,7 @@ use these features. There is a document entitled "readline.texinfo"
which contains both end-user and programmer documentation for the
GNU Readline Library.
-Copyright (C) 1988--2012 Free Software Foundation, Inc.
+Copyright (C) 1988--2014 Free Software Foundation, Inc.
Authored by Brian Fox and Chet Ramey.
@@ -1189,11 +1189,17 @@ as if the @samp{!$} history expansion had been specified.
@subsection Commands For Changing Text
@ftable @code
+
+@item @i{end-of-file} (usually C-d)
+The character indicating end-of-file as set, for example, by
+@code{stty}. If this character is read when there are no characters
+on the line, and point is at the beginning of the line, Readline
+interprets it as the end of input and returns @sc{eof}.
+
@item delete-char (C-d)
-Delete the character at point. If point is at the
-beginning of the line, there are no characters in the line, and
-the last character typed was not bound to @code{delete-char}, then
-return @sc{eof}.
+Delete the character at point. If this function is bound to the
+same character as the tty @sc{eof} character, as @kbd{C-d}
+commonly is, see above for the effects.
@item backward-delete-char (Rubout)
Delete the character behind the cursor. A numeric argument means
diff --git a/lib/readline/doc/rluserman.texi b/lib/readline/doc/rluserman.texi
index 2281a1a9..ba6b0ad8 100644
--- a/lib/readline/doc/rluserman.texi
+++ b/lib/readline/doc/rluserman.texi
@@ -12,7 +12,7 @@ This manual describes the end user interface of the GNU Readline Library
consistency of user interface across discrete programs which provide
a command line interface.
-Copyright @copyright{} 1988--2012 Free Software Foundation, Inc.
+Copyright @copyright{} 1988--2014 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/lib/readline/doc/version.texi b/lib/readline/doc/version.texi
index db450183..70b66582 100644
--- a/lib/readline/doc/version.texi
+++ b/lib/readline/doc/version.texi
@@ -1,10 +1,10 @@
@ignore
-Copyright (C) 1988-2013 Free Software Foundation, Inc.
+Copyright (C) 1988-2014 Free Software Foundation, Inc.
@end ignore
@set EDITION 6.3
@set VERSION 6.3
-@set UPDATED 26 May 2013
-@set UPDATED-MONTH May 2013
+@set UPDATED 6 January 2014
+@set UPDATED-MONTH January 2014
-@set LASTCHANGE Sat May 25 17:02:56 EDT 2013
+@set LASTCHANGE Mon Jan 6 16:26:51 EST 2014
diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c
index 6164e27c..4899b9d3 100644
--- a/lib/readline/histexpand.c
+++ b/lib/readline/histexpand.c
@@ -272,6 +272,8 @@ get_history_event (string, caller_index, delimiting_quote)
if (local_index == 0 || substring_okay)
{
entry = current_history ();
+ if (entry == 0)
+ FAIL_SEARCH ();
history_offset = history_length;
/* If this was a substring search, then remember the
diff --git a/lib/readline/parse-colors.c b/lib/readline/parse-colors.c
index 06eb25ac..98b2e9d1 100644
--- a/lib/readline/parse-colors.c
+++ b/lib/readline/parse-colors.c
@@ -283,7 +283,9 @@ get_funky_string (char **dest, const char **src, bool equals_end, size_t *output
default:
/* should we ? */
- abort ();
+ /* abort (); no, we should not */
+ state = ST_ERROR;
+ break;
}
}
@@ -387,7 +389,16 @@ void _rl_parse_colors()
}
}
if (state == -1)
- _rl_errmsg ("LS_COLORS: unrecognized prefix: %s", label);
+ {
+ _rl_errmsg ("LS_COLORS: unrecognized prefix: %s", label);
+ /* recover from an unrecognized prefix */
+ while (p && *p && *p != ':')
+ p++;
+ if (p && *p == ':')
+ state = 1;
+ else if (p && *p == 0)
+ state = 0;
+ }
}
break;
@@ -400,6 +411,9 @@ void _rl_parse_colors()
}
else
state = -1;
+ /* XXX - recover here as with an unrecognized prefix? */
+ if (state == -1 && ext->ext.string)
+ _rl_errmsg ("LS_COLORS: syntax error: %s", ext->ext.string);
break;
}
}
@@ -417,6 +431,8 @@ void _rl_parse_colors()
e = e->next;
free (e2);
}
+ _rl_color_ext_list = NULL;
+ _rl_colored_stats = 0; /* can't have colored stats without colors */
}
#else /* !COLOR_SUPPORT */
;
diff --git a/lib/readline/search.c b/lib/readline/search.c
index 99b9c8d3..028c2505 100644
--- a/lib/readline/search.c
+++ b/lib/readline/search.c
@@ -172,7 +172,8 @@ noninc_dosearch (string, dir)
oldpos = where_history ();
history_set_pos (noninc_history_pos);
- entry = current_history ();
+ entry = current_history (); /* will never be NULL after successful search */
+
#if defined (VI_MODE)
if (rl_editing_mode != vi_mode)
#endif
@@ -477,7 +478,7 @@ rl_history_search_internal (count, dir)
rl_history_search_pos = ret;
oldpos = where_history ();
history_set_pos (rl_history_search_pos);
- temp = current_history ();
+ temp = current_history (); /* will never be NULL after successful search */
history_set_pos (oldpos);
/* Don't find multiple instances of the same line. */
diff --git a/lib/readline/signals.c b/lib/readline/signals.c
index d373ba14..61f02f9f 100644
--- a/lib/readline/signals.c
+++ b/lib/readline/signals.c
@@ -260,7 +260,7 @@ _rl_handle_signal (sig)
# endif /* HAVE_BSD_SIGNALS */
#endif /* !HAVE_POSIX_SIGNALS */
- rl_reset_after_signal ();
+ rl_reset_after_signal ();
}
RL_UNSETSTATE(RL_STATE_SIGHANDLER);
diff --git a/lib/readline/undo.c b/lib/readline/undo.c
index 32873d27..a3d40447 100644
--- a/lib/readline/undo.c
+++ b/lib/readline/undo.c
@@ -178,6 +178,7 @@ rl_do_undo ()
{
UNDO_LIST *release;
int waiting_for_begin, start, end;
+ HIST_ENTRY *cur, *temp;
#define TRANS(i) ((i) == -1 ? rl_point : ((i) == -2 ? rl_end : (i)))
@@ -232,6 +233,18 @@ rl_do_undo ()
release = rl_undo_list;
rl_undo_list = rl_undo_list->next;
+
+ /* If we are editing a history entry, make sure the change is replicated
+ in the history entry's line */
+ cur = current_history ();
+ if ((UNDO_LIST *)cur->data == release)
+ {
+ temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list);
+ xfree (temp->line);
+ FREE (temp->timestamp);
+ xfree (temp);
+ }
+
replace_history_data (-1, (histdata_t *)release, (histdata_t *)rl_undo_list);
xfree (release);