--- embedaddon/readline/CHANGES 2014/07/30 08:16:45 1.1.1.1 +++ embedaddon/readline/CHANGES 2021/03/17 01:01:01 1.1.1.2 @@ -1,3 +1,453 @@ +This document details the changes between this version, readline-8.1, and +the previous version, readline-8.0. + +1. Changes to Readline + +a. There are a number of fixes that were found as the result of fuzzing with + random input. + +b. Changed the revert-all-at-newline behavior to make sure to start at the end + of the history list when doing it, instead of the line where the user hit + return. + +c. When parsing `set' commands from the inputrc file or an application, readline + now allows trailing whitespace. + +d. Fixed a bug that left a file descriptor open to the history file if the + file size was 0. + +e. Fixed a problem with binding key sequences containing meta characters. + +f. Fixed a bug that caused the wrong line to be displayed if the user tried to + move back beyond the beginning of the history list, or forward past the end + of the history list. + +g. If readline catches SIGTSTP, it now sets a hook that allows the calling + application to handle it if it desires. + +h. Fixed a redisplay problem with a prompt string containing embedded newlines. + +i. Fixed a problem with completing filenames containing invalid multibyte + sequences when case-insensitive comparisons are enabled. + +j. Fixed a redisplay problem with prompt strings containing invisible multibyte + characters. + +k. Fixed a problem with multibyte characters mapped to editing commands that + modify the search string in incremental search. + +l. Fixed a bug with maintaining the key sequence while resolving a bound + command in the presence of ambiguous sequences (sequences with a common + prefix), in most cases while attempting to unbind it. + +m. Fixed several buffer overflows found as the result of fuzzing. + +n. Reworked backslash handling when translating key sequences for key binding + to be more uniform and consistent, which introduces a slight backwards + incompatibility. + +o. Fixed a bug with saving the history that resulted in errors not being + propagated to the calling application when the history file is not writable. + +p. Readline only calls chown(2) on a newly-written history file if it really + needs to, instead of having it be a no-op. + +q. Readline now behaves better when operate-and-get-next is used when the + history list is `full': when there are already $HISTSIZE entries. + +r. Fixed a bug that could cause vi redo (`.') of a replace command not to work + correctly in the C or POSIX locale. + +s. Fixed a bug with vi-mode digit arguments that caused the last command to be + set incorrectly. This prevents yank-last-arg from working as intended, for + example. + +t. Make sure that all undo groups are closed when leaving vi insertion mode. + +u. Make sure that the vi-mode `C' and `c' commands enter insert mode even if + the motion command doesn't have any effect. + +v. Fixed several potential memory leaks in the callback mode context handling. + +w. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while + executing the terminal cleanup code, since it's no longer run in a signal + handling context. + +x. Fixed a bug that could cause an application with an application-specific + redisplay function to crash if the line data structures had not been + initialized. + +y. Terminals that are named "dumb" or unknown do not enable bracketed paste + by default. + +z. Ensure that disabling bracketed paste turns off highlighting the incremental + search string when the search is successful. + +2. New Features in Readline + +a. If a second consecutive completion attempt produces matches where the first + did not, treat it as a new completion attempt and insert a match as + appropriate. + +b. Bracketed paste mode works in more places: incremental search strings, vi + overstrike mode, character search, and reading numeric arguments. + +c. Readline automatically switches to horizontal scrolling if the terminal has + only one line. + +d. Unbinding all key sequences bound to a particular readline function now + descends into keymaps for multi-key sequences. + +e. rl-clear-display: new bindable command that clears the screen and, if + possible, the scrollback buffer (bound to emacs mode M-C-l by default). + +f. New active mark and face feature: when enabled, it will highlight the text + inserted by a bracketed paste (the `active region') and the text found by + incremental and non-incremental history searches. This is tied to bracketed + paste and can be disabled by turning off bracketed paste. + +g. Readline sets the mark in several additional commands. + +h. Bracketed paste mode is enabled by default. There is a configure-time + option (--enable-bracketed-paste-default) to set the default to on or off. + +i. Readline tries to take advantage of the more regular structure of UTF-8 + characters to identify the beginning and end of characters when moving + through the line buffer. + +j. The bindable operate-and-get-next command (and its default bindings) are + now part of readline instead of a bash-specific addition. + +k. The signal cleanup code now blocks SIGINT while processing after a SIGINT. + +------------------------------------------------------------------------------- +This document details the changes between this version, readline-8.0, and the +previous version, readline-7.0. + +1. Changes to Readline + +a. Added a guard to prevent nested macros from causing an infinite expansion + loop. + +b. Instead of allocating enough history list entries to hold the maximum list + size, cap the number allocated initially. + +c. Added a strategy to avoid allocating huge amounts of memory if a block of + history entries without timestamps occurs after a block with timestamps. + +d. Added support for keyboard timeouts when an ESC character is the last + character in a macro. + +e. There are several performance improvements when in a UTF-8 locale. + +f. Readline does a better job of preserving the original set of blocked + signals when using pselect() to wait for input. + +g. Fixed a bug that caused multibyte characters in macros to be mishandled. + +h. Fixed several bugs in the code that calculates line breaks when expanding + prompts that span several lines, contain multibyte characters, and contain + invisible character seqeuences. + +i. Fixed several bugs in cursor positioning when displaying lines with prompts + containing invisible characters and multibyte characters. + +j. When performing case-insensitive completion, Readline no longer sorts the + list of matches unless directed to do so. + +k. Fixed a problem with key sequences ending with a backslash. + +l. Fixed out-of-bounds and free memory read errors found via fuzzing. + +m. Fixed several cases where the mark was set to an invalid value. + +n. Fixed a problem with the case-changing operators in the case where the + lower and upper case versions of a character do not have the same number + of bytes. + +o. Handle incremental and non-incremental search character reads returning EOF. + +p. Handle the case where a failing readline command at the end of a multi-key + sequence could be misinterpreted. + +q. The history library now prints a meaningful error message if the history + file isn't a regular file. + +r. Fixed a problem with vi-mode redo (`.') on a command when trying to replace + a multibyte character. + +s. The key binding code now attempts to remove a keymap if a key unbinding + leaves it empty. + +t. Fixed a line-wrapping issue that caused problems for some terminal + emulators. + +u. If there is a key bound to the tty's VDISCARD special character, readline + disables VDISCARD while it is active. + +v. Fixed a problem with exiting bracketed paste mode on terminals that assume + the bracketed paste mode character sequence contains visible characters. + +w. Fixed a bug that could cause a key binding command to refer to an + uninitialized variable. + +x. Added more UTF-8-specific versions of multibyte functions, and optimized + existing functions if the current locale uses UTF-8 encoding. + +y. Fixed a problem with bracketed-paste inserting more than one character and + interacting with other readline functions. + +z. Fixed a bug that caused the history library to attempt to append a history + line to a non-existent history entry. + +aa. If using bracketed paste mode, output a newline after the \r that is the + last character of the mode disable string to avoid overwriting output. + +bb. Fixes to the vi-mode `b', `B', `w', `W', `e', and `E' commands to better + handle multibyte characters. + +cc. Fixed a redisplay problem that caused an extra newline to be generated on + accept-line when the line length is exactly the screenwidth. + +dd. Fixed a bug with adding multibyte characters to an incremental search + string. + +ee. Fixed a bug with redoing text insertions in vi mode. + +ff. Fixed a bug with pasting text into an incremental search string if bracketed + paste mode is enabled. ESC cannot be one of the incremental search + terminator characters for this to work. + +gg. Fixed a bug with anchored search patterns when performing searches in vi + mode. + +2. New Features in Readline + +a. Non-incremental vi-mode search (`N', `n') can search for a shell pattern, as + Posix specifies (uses fnmatch(3) if available). + +b. There are new `next-screen-line' and `previous-screen-line' bindable + commands, which move the cursor to the same column in the next, or previous, + physical line, respectively. + +c. There are default key bindings for control-arrow-key key combinations. + +d. A negative argument (-N) to `quoted-insert' means to insert the next N + characters using quoted-insert. + +e. New public function: rl_check_signals(), which allows applications to + respond to signals that readline catches while waiting for input using + a custom read function. + +f. There is new support for conditionally testing the readline version in an + inputrc file, with a full set of arithmetic comparison operators available. + +g. There is a simple variable comparison facility available for use within an + inputrc file. Allowable operators are equality and inequality; string + variables may be compared to a value; boolean variables must be compared to + either `on' or `off'; variable names are separated from the operator by + whitespace. + +h. The history expansion library now understands command and process + substitution and extended globbing and allows them to appear anywhere in a + word. + +i. The history library has a new variable that allows applications to set the + initial quoting state, so quoting state can be inherited from a previous + line. + +j. Readline now allows application-defined keymap names; there is a new public + function, rl_set_keymap_name(), to do that. + +k. The "Insert" keypad key, if available, now puts readline into overwrite + mode. + +------------------------------------------------------------------------------- +This document details the changes between this version, readline-7.0, and the +previous version, readline-6.3. + +1. Changes to Readline + +a. A bug that caused vi-mode `.' to be unable to redo `c', `d', and `y' + commands with modifiers was fixed. + +b. Fixed a bug that caused callback mode to dump core when reading a + multiple-key sequence (e.g., arrow keys). + +c. Fixed a bug that caused the redisplay code to erase some of the line when + using horizontal scrolling with incremental search. + +d. Readline's input handler now performs signal processing if read(2) is + interrupted by SIGALRM or SIGVTALRM. + +e. Fixed a problem with revert-all-at-newline freeing freed memory. + +f. Clarified the documentation for the history_quotes_inhibit_expansion + variable to note that it inhibits scanning for the history comment + character and that it only affects double-quoted strings. + +g. Fixed an off-by-one error in the prompt printed when performing searches. + +h. Use pselect(2), if available, to wait for input before calling read(2), so + a SIGWINCH can interrupt it, since it doesn't interrupt read(2). + +i. Some memory leaks caused by signals interrupting filename completion have + been fixed. + +j. Reading EOF twice on a non-empty line causes EOF to be returned, rather + than the partial line. This can cause partial lines to be executed on + SIGHUP, for example. + +k. Fixed a bug concerning deleting multibyte characters from the search + string while performing an incremental search. + +l. Fixed a bug with tilde expanding directory names in filename completion. + +m. Fixed a bug that did not allow binding sequences beginning with a `\'. + +n. Fixed a redisplay bug involving incorrect line wrapping when the prompt + contains a multibyte character in the last screen column. + +o. Fixed a bug that caused history expansion to disregard characters that are + documented to delimit a history event specifier without requiring `:'. + +p. Fixed a bug that could cause reading past the end of a string when reading + the value when binding the set of isearch terminators. + +q. Fixed a bug that caused readline commands that depend on knowing which + key invoked them to misbehave when dispatching key sequences that are + prefixes of other key bindings. + +r. Paren matching now works in vi insert mode. + +s. Colored completion prefixes are now displayed using a different color, less + likely to collide with files. + +t. Fixed a bug that caused vi-mode character search to misbehave when + running in callback mode. + +u. Fixed a bug that caused output to be delayed when input is coming from a + macro in vi-mode. + +v. Fixed a bug that caused the vi-mode `.' command to misbehave when redoing + a multi-key key sequence via a macro. + +w. Fixed a bug that caused problems with applications that supply their own + input function when performing completion. + +x. When read returns -1/EIO when attempting to read a key, return an error + instead of line termination back to the caller. + +y. Updated tty auditing feature based on patch from Red Hat. + +z. Fixed a bug that could cause the history library to crash on overflows + introduced by malicious editing of timestamps in the history file. + +aa. The history file writing functions only attempt to create and use a backup + history file if the history file exists and is a regular file. + +bb. Fixed an out-of-bounds read in readline's internal tilde expansion interface. + +cc. Fixed several redisplay bugs with prompt strings containing multibyte + and non-visible characters whose physical length is longer than the screen + width. + +dd. Fixed a redisplay bug with prompt strings containing invisible characters + whose physical length exceeds the screen width and using incremental search. + +ee. Readline prints more descriptive error messages when it encounters errors + while reading an inputrc file. + +ff. Fixed a bug in the character insertion code that attempts to optimize + typeahead when it reads a character that is not bound to self-insert and + resets the key sequence state. + +gg. When refreshing the line as the result of a key sequence, Readline attempts + to redraw only the last line of a multiline prompt. + +hh. Fixed an issue that caused completion of git commands to display + incorrectly when using colored-completion-prefix. + +ii. Fixed several redisplay bugs having to do with multibyte characters and + invisible characters in prompt strings. + +jj. Fixed a bug that caused mode strings to be displayed incorrectly if the + prompt was shorter than the mode string. + +2. New Features in Readline + +a. The history truncation code now uses the same error recovery mechansim as + the history writing code, and restores the old version of the history file + on error. The error recovery mechanism handles symlinked history files. + +b. There is a new bindable variable, `enable-bracketed-paste', which enables + support for a terminal's bracketed paste mode. + +c. The editing mode indicators can now be strings and are user-settable + (new `emacs-mode-string', `vi-cmd-mode-string' and `vi-ins-mode-string' + variables). Mode strings can contain invisible character sequences. + Setting mode strings to null strings restores the defaults. + +d. Prompt expansion adds the mode string to the last line of a multi-line + prompt (one with embedded newlines). + +e. There is a new bindable variable, `colored-completion-prefix', which, if + set, causes the common prefix of a set of possible completions to be + displayed in color. + +f. There is a new bindable command `vi-yank-pop', a vi-mode version of emacs- + mode yank-pop. + +g. The redisplay code underwent several efficiency improvements for multibyte + locales. + +h. The insert-char function attempts to batch-insert all pending typeahead + that maps to self-insert, as long as it is coming from the terminal. + +i. rl_callback_sigcleanup: a new application function that can clean up and + unset any state set by readline's callback mode. Intended to be used + after a signal. + +j. If an incremental search string has its last character removed with DEL, the + resulting empty search string no longer matches the previous line. + +k. If readline reads a history file that begins with `#' (or the value of + the history comment character) and has enabled history timestamps, the history + entries are assumed to be delimited by timestamps. This allows multi-line + history entries. + +l. Readline now throws an error if it parses a key binding without a terminating + `:' or whitespace. + +m. The default binding for ^W in vi mode now uses word boundaries specified + by Posix (vi-unix-word-rubout is bindable command name). + +n. rl_clear_visible_line: new application-callable function; clears all + screen lines occupied by the current visible readline line. + +o. rl_tty_set_echoing: application-callable function that controls whether + or not readline thinks it is echoing terminal output. + +p. Handle >| and strings of digits preceding and following redirection + specifications as single tokens when tokenizing the line for history + expansion. + +q. Fixed a bug with displaying completions when the prefix display length + is greater than the length of the completions to be displayed. + +r. The :p history modifier now applies to the entire line, so any expansion + specifying :p causes the line to be printed instead of expanded. + +s. New application-callable function: rl_pending_signal(): returns the signal + number of any signal readline has caught but not yet handled. + +t. New application-settable variable: rl_persistent_signal_handlers: if set + to a non-zero value, readline will enable the readline-6.2 signal handler + behavior in callback mode: handlers are installed when + rl_callback_handler_install is called and removed removed when a complete + line has been read. + +------------------------------------------------------------------------------- This document details the changes between this version, readline-6.3, and the previous version, readline-6.2.