Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[textinput] Undo buffer misses one entry in the actual sequence #10182

Closed
ferdymercury opened this issue Mar 21, 2022 · 1 comment · Fixed by #10192
Closed

[textinput] Undo buffer misses one entry in the actual sequence #10182

ferdymercury opened this issue Mar 21, 2022 · 1 comment · Fixed by #10192

Comments

@ferdymercury
Copy link
Contributor

Describe the bug

The undo shortcut in the prompt editor misses one entry in the sequence (I guess it is not added to the buffer)

Expected behavior

Entries where ENTER are pressed are also added to the undo buffer.

To Reproduce

root -l
root [0] int x
(int) 0
root [1] float y
(float) 0.00000f
// Start then pressing repeatedly CTRL+_

--> Neither x nor y are shown when undoing.

Setup

   ------------------------------------------------------------------
  | Welcome to ROOT 6.27/01                        https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Jan 12 2022, 10:17:19                 |
  | From heads/master@v6-25-01-2870-gdac9b6398d                      |
  | With c++ (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0                     |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

Additional context

#10121

@jalopezg-git
Copy link
Contributor

Actually, I think that the correct behavior should be to clear the undo history after accepting a new input line (which also follows what GNU-readline does).

jalopezg-git added a commit to jalopezg-git/root that referenced this issue Mar 21, 2022
The undo buffer should only be kept for the current line (as in GNU readline).

Fixes root-project#10182.
jalopezg-git added a commit that referenced this issue Mar 22, 2022
The undo buffer should only be kept for the current line (as in GNU readline).

Fixes #10182.
Neel-Shah-29 pushed a commit to Neel-Shah-29/root-1 that referenced this issue Apr 6, 2022
The undo buffer should only be kept for the current line (as in GNU readline).

Fixes root-project#10182.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants