[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

optimized_assignment and READLINE_LINE

From: Grisha Levit
Subject: optimized_assignment and READLINE_LINE
Date: Tue, 21 Mar 2017 11:51:24 -0400

The new optimized assignment in the devel branch that is used when
appending to a string has a bug with the way READLINE_LINE is checked
in bash_execute_unix_command:

    v = bind_variable ("READLINE_LINE", rl_line_buffer, 0);
    l = v ? value_cell (v) : 0;

    # parse_and_execute ...

    v = find_variable ("READLINE_LINE");
    l1 = v ? value_cell (v) : 0;
    if (l1 != l)
        maybe_make_readline_line (value_cell (v));

For example:

    $ bind -x '"\C-g": f'
    $ f() { READLINE_LINE+=x; }
    $ ^G
    (nothing happens)

Not sure if any other places have the same issue; I couldn't
immediately find any.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]