Andrew Burgess <[email protected]> writes: > Chet Ramey <[email protected]> writes: > >> The first beta release of the GNU Readline library, version 8.2, >> is now available with the URLs >> >> ftp://ftp.cwru.edu/pub/bash/readline-8.2-beta.tar.gz >> https://ftp.gnu.org/pub/gnu/readline/readline-8.2-beta.tar.gz >> >> and from the readline-8.2-testing branch in the readline git repository >> (http://git.savannah.gnu.org/cgit/readline.git/log/?h=readline-8.2-testing). >> >> You can use >> >> git clone --branch readline-8.2-testing >> git://git.savannah.gnu.org/readline.git >> >> to clone the testing branch. >> >> The CWRU FTP site works best if your client supports Extended Passive >> (EPSV) mode. >> >> This distribution is essentially a standalone version of the >> readline library that appears in bash-5.2-beta together with >> an `autoconf' framework. The documentation has been updated and >> is current. Postscript, DVI, and Info versions of the Readline >> and History manuals are included. A list of changes in this >> release is appended to this announcement. >> >> This release accompanies the simultaneous release of bash-5.2-beta. >> There are more improvements in the programming interface and new >> user-visible variables and bindable commands. >> >> The most visible new feature is the addition of a new option which allows >> users to turn off the active region support without disabling bracketed >> paste. The option has the same default value as bracketed-paste, and >> enabling bracketed paste enables the active region. When the default >> value of of bracketed paste is enabled, unsetting this option in an >> inputrc file should suffice to disable active region support. >> >> There are two new bindable readline variables, active-region-start-color >> and active-region-end-color. The first sets the color used to display the >> active region; the second turns it off. If set, these are used in place of >> the escape sequences that enable and disable terminal standout mode. >> >> There are bug fixes for redisplaying the prompt when aborting incremental >> searches or switching to and from a digit-argument prompt. There is a fix >> for a redisplay problem that caused the prompt to be wrapped incorrectly >> if the screen changed dimensions during a call to readline() and the prompt >> became longer than the screen width. There are fixes for a couple of >> problems that could cause rl_end to be set incorrectly. >> >> Full details of the changes and bug fixes are below. >> >> GNU Readline is a library which provides programs with an input >> facility including command-line editing and history. Editing >> commands similar to both emacs and vi are included. The GNU >> History library, which provides facilities for managing a list of >> previously-typed command lines and an interactive command line >> recall facility similar to that provided by csh, is also present. >> The history library is built as part of the readline as well as >> separately. >> >> Since this is a testing release, please send readline bug reports to >> [email protected]. > > I found an issue with the alternative callback API and EOF detection > that was added after my earlier requests: > > https://lists.gnu.org/archive/html/bug-readline/2022-02/msg00021.html > > It appears that in some cases the EOF flag will be set when I don't > think that it should be. > > I've included a test program at the end of this email, the test is based > on the alternative interface example from the manual. > > Build the test and run it, you'll see something like this: > > rltest$ > > type anything you like at the prompt (I use 'abc') and then press > return, the application echos your input back. You should see this: > > rltest$ abc > input line: abc > rltest$ > > Now if I use the up arrow key to select my previous input, and press > return, the complete output is now this: > > rltest$ abc > input line: abc > rltest$ abc > quit > input line: abc > rltest$ > > Notice the extra 'quit' that appeared. This was from cb_deprep_terminal > (installed as rl_deprep_term_function) in the program below, the quit is > printed when the EOF flag is set. > > The problem seems to originate from the handling of 'RL_ISSTATE > (RL_STATE_MULTIKEY)' in rl_callback_read_char (callback.c), where eof is > set as a result of calling _rl_dispatch_callback. I don't currently > understand what the return value of _rl_dispatch_callback actually > represents
Apologies, I inadvertently hit send on this email prematurely. I was going to finish with: ... I don't currently understand what's going wrong here, but thought I should raise this issue for consideration. Thanks, Andrew
