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

In the REPL window, redo works in mysterioius ways #462

Closed
PEZ opened this issue Nov 11, 2019 · 8 comments
Closed

In the REPL window, redo works in mysterioius ways #462

PEZ opened this issue Nov 11, 2019 · 8 comments
Labels
bug Something isn't working evaluation

Comments

@PEZ
Copy link
Collaborator

PEZ commented Nov 11, 2019

Issue Type: Bug

There is something funny with the undo/redo stack, such that if you undo things a few steps and then redo, resiprocity is lost: the things that are redone, are not those that were undone.

Steps to reproduce:

  1. Close the REPL window.
  2. Open the REPL window.
  3. Type in some nice clojure code, and edit it some.
  4. Undo
  5. Redo
  • Expected: The code should be restored to what it was before Undo.
  • Actual: Depending on what you have typed and how you have edited it, different shapes of code materialises, but seldom the code that was there before Undo.

Further. If you press undo a few steps and then undo many steps, really crazy things can happen. Check this gif:

redo-issue

The last stuff that gets entered there is not me typing. I am just redoing several times.

Extension version: 2.0.60
VS Code version: Code 1.40.0 (86405ea23e3937316009fc27c9361deee66ffbf5, 2019-11-06T17:09:34.601Z)
OS version: Darwin x64 19.0.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 16.00GB (0.08GB free)
Process Argv -psn_0_458864
Screen Reader no
VM 0%
@cfehse
Copy link
Contributor

cfehse commented Nov 12, 2019

@PEZ @bpringe

This is what your sequence looks like on my systems (showing Windows but on Linux as well):

calva-repl-undo-sequence

I cannot reproduce it. Peter if you have the time perhaps you can fire your Windows VM up and give it a try there? Brandon are you on macOS as well? Perhaps you can confirm the issue.

@PEZ
Copy link
Collaborator Author

PEZ commented Nov 12, 2019

I'll try it on Windows. Maybe it is my fix for lineendings that introduced this... That is easy enough to test.

@cfehse cfehse added bug Something isn't working evaluation repl-window labels Nov 12, 2019
@bpringe
Copy link
Member

bpringe commented Nov 12, 2019

I'm on Windows. ctrl+z works for undo, but ctrl+y does not work for redo. Am I hitting the wrong keys? If not, redo does not work at all for me.

@bpringe
Copy link
Member

bpringe commented Nov 12, 2019

Nevermind, I see that it's ctrl+shift+z to redo. But it's ctrl+y in the editor. Is there a reason not to make it the same in the repl window?

@bpringe
Copy link
Member

bpringe commented Nov 12, 2019

Btw redo works fine for me on windows. I can't replicate what @PEZ showed.

@PEZ
Copy link
Collaborator Author

PEZ commented Nov 12, 2019

You are the second member of the Calva Team who ask about the ctrl+y mystery, @bpringe . Might be time we fix that. (In some good way.)

About the issue. I can't repro it on Windows. undo/redo works like a charm there.

It's interesting that it works on Linux. That might indicate that it is not an eol thing. Can someone of you debug what the eol setting the LineInputModel gets for the REPL prompt? I'd do it if it wasn't that it is painful, not only to use Windows, but also that it is so extremely slow in the virtual environment.

@PEZ
Copy link
Collaborator Author

PEZ commented Nov 12, 2019

On my Windows machine both ctrl+y and ctrl+shift+z are mapped to undo in the editor, btw.

@PEZ
Copy link
Collaborator Author

PEZ commented Nov 12, 2019

OK. I now tried this with Calva v2.0.50 (just to pick something older than my eol fix. It is the same. This could be some weird MacOS Catalina issue, because I think I should have noticed this before otherwise. (I newly upgraded to Cataline). Will check with my colleague tomorrow, who is still on El Capitain.

@PEZ PEZ closed this as completed in c84a454 Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working evaluation
Projects
None yet
Development

No branches or pull requests

3 participants