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

Only Ctrl-Y yank doesn't work in REPL #41252

Closed
AndrewGoal opened this issue Dec 20, 2021 · 2 comments · Fixed by #41301
Closed

Only Ctrl-Y yank doesn't work in REPL #41252

AndrewGoal opened this issue Dec 20, 2021 · 2 comments · Fixed by #41301
Labels
repl Issues and PRs related to the REPL subsystem.

Comments

@AndrewGoal
Copy link

AndrewGoal commented Dec 20, 2021

Version

all version

Platform

all platform

Subsystem

REPL

What steps will reproduce the bug?

  1. input node to enter REPL
  2. input some text, such as ".help"
  3. input ctrl-a to move cursor position to begin of ".help"
  4. input ctrl-k to kill from the cursor position to end of line, in other words, the ".help" will be killed and disappeared, so that we can yank at next step
  5. input ctrl-y to yank, the ".help" should be yanked and appear again. But, obviously, this did not happen.

And using the above steps in python's REPL, step 5 can work well.

How often does it reproduce? Is there a required condition?

always

What is the expected behavior?

ctrl-y can yank, just like in REPL of python.

What do you see instead?

No response

Additional information

Alt-F,Alt-B,Alt-Backspace,Ctrl-F,Ctrl-B , Ctrl-K work well in REPL

@AndrewGoal AndrewGoal changed the title Is there a known reason why Ctrl-Y yanking doesn't work Only Ctrl-Y yank doesn't work in RPEL Dec 20, 2021
@AndrewGoal
Copy link
Author

case 'k': // Delete from current to end of line

@AndrewGoal
Copy link
Author

#20145

@Mesteery Mesteery added the repl Issues and PRs related to the REPL subsystem. label Dec 20, 2021
@VoltrexKeyva VoltrexKeyva changed the title Only Ctrl-Y yank doesn't work in RPEL Only Ctrl-Y yank doesn't work in REPL Dec 22, 2021
nodejs-github-bot pushed a commit that referenced this issue Jan 22, 2022
1. `Ctrl-Y` to yank previously deleted text
2. `Meta-Y` to do yank pop (cycle among deleted texts)
3. Use `getCursorPos().rows` to check if we have reached a new line,
instead of `getCursorPos().cols === 0`.
4. document and unittests.

PR-URL: #41301
Fixes: #41252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
BethGriggs pushed a commit that referenced this issue Jan 25, 2022
1. `Ctrl-Y` to yank previously deleted text
2. `Meta-Y` to do yank pop (cycle among deleted texts)
3. Use `getCursorPos().rows` to check if we have reached a new line,
instead of `getCursorPos().cols === 0`.
4. document and unittests.

PR-URL: #41301
Fixes: #41252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Linkgoron pushed a commit to Linkgoron/node that referenced this issue Jan 31, 2022
1. `Ctrl-Y` to yank previously deleted text
2. `Meta-Y` to do yank pop (cycle among deleted texts)
3. Use `getCursorPos().rows` to check if we have reached a new line,
instead of `getCursorPos().cols === 0`.
4. document and unittests.

PR-URL: nodejs#41301
Fixes: nodejs#41252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants