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

REPL keyboard shortcuts and autocomplete broken in >= 2.0.67 #515

Closed
elldritch opened this issue Dec 12, 2019 · 11 comments
Closed

REPL keyboard shortcuts and autocomplete broken in >= 2.0.67 #515

elldritch opened this issue Dec 12, 2019 · 11 comments

Comments

@elldritch
Copy link

elldritch commented Dec 12, 2019

This bug is report going to be really weird.

I had an infinite loop in my REPL which wasn't responding to ctrl+d and was also making VS Code unresponsive, so I killed VSC with xkill.

This looks like it's happening due to an upgrade to Calva >= 2.0.67 that occurred after my editor restarted.

Some symptoms I'm seeing:

  • My backspace and delete keys don't work in the REPL window (I'll hit backspace and the character won't delete) nor do enter, alt+enter, or alt+up/down (nothing happens) when I first connect the REPL. Curiously, ctrl+l and shift+arrow (to select) work fine.
  • After I focus another window (not the VS Code window) and go back, my REPL works again. My REPL stops working again after I focus an editor tab.
  • For some reason, opening "Keyboard shortcuts" also causes my REPL window to start working again the same as if I focused another window (and similarly, focusing another editor tab causes my REPL window to stop working again).
  • When my REPL does work, autocomplete is adding characters after my cursor rather than finishing my word (e.g. autocompleting (fo with foobar will result in (fofoobar rather than (foobar).

Some other weirdness that I think might be unrelated:

  • On latest Calva (2.0.68), my REPL has a sans-serif font rather than the usual monospace one. This might actually have just been unfortunate timing - VSC restarting may have coincided with 2.0.68 being released with 33abe9b which I'm pretty sure is the cause.
    • All sorts of extra things break with the sans-serif proportional font (e.g. highlighting for selected characters in the REPL is misaligned with the actual rendered characters - the highlights act as if they are selecting invisible monospace characters), but this is honestly the least of my problems right now and I've gotten along by downgrading to 2.0.67.

Some things I have tried:

  • Reinstalling Calva
  • Downgrading Calva
  • rm -rf $HOME/.vscode/extensions/{calva folders} before reinstalling
  • Disabling and re-enabling Calva
  • Rebooting the machine
  • lein clean

At this point I'm out of ideas. As far as I can tell, I have reset the extension, reset my REPL, reset VSC, and restarted my computer. I have no idea what else could be breaking.

I think what is happening here is that the keyboard input in the REPL window is being disabled because so many of the bindings are active when calva:replWindowActive, and something is causing this property to not be true.

@elldritch
Copy link
Author

Uninstalling and reinstalling the editor with a clean $HOME/.config/Code and $HOME/.vscode also hasn't fixed the problem.

@elldritch
Copy link
Author

elldritch commented Dec 12, 2019

Things are working again now that I've downgraded to 2.0.66. I'm not sure if this is just a coincidence - it may be possible that I've been running on 2.0.66 and didn't load the latest version until the xkill. I'll keep this thread posted if I experience bugs running 2.0.66.

@PEZ
Copy link
Collaborator

PEZ commented Dec 12, 2019

I think it sounds like the xkill isn't part of the problem. Can you try with 2.0.67?

PEZ added a commit that referenced this issue Dec 12, 2019
@PEZ
Copy link
Collaborator

PEZ commented Dec 12, 2019

Found the problem with the font. Fix is going out in a moment.

The other problem is probably related to a part of 2.0.67, but I have so far not been able to reproduce it.

@elldritch
Copy link
Author

I think you're right. I'm able to reliably reproduce the backspace and autocomplete problems in 2.0.67, and haven't attempted to reproduce the others. If it helps with debugging, the project I'm working on is https://github.com/liftM/advent2019.

@elldritch elldritch changed the title REPL window no longer works after xkill REPL keyboard shortcuts and autocomplete broken in >= 2.0.67 Dec 13, 2019
@elldritch
Copy link
Author

See also #519, which reports the same autocomplete issue.

@elldritch
Copy link
Author

I think this is due to keyboard shortcuts not activating due to calva:replWindowActive not being set properly. a603081 between 2.0.66 and 2.0.67 looks suspicious to me.

@PEZ
Copy link
Collaborator

PEZ commented Dec 13, 2019

Indeed. .70 fixes some of it. Auto-complete remains.

@PEZ
Copy link
Collaborator

PEZ commented Dec 13, 2019

Autocomplete is being fixed in #520 , see #519 for a link to a VSIX package to test.

@PEZ
Copy link
Collaborator

PEZ commented Dec 13, 2019

I think 2.0.71 should fix the last piece of this mess. Please close this issue if you agree. 😄

Thanks for reporting. I could have remained oblivious of the problems for quite a while w/o your help!

@elldritch
Copy link
Author

This looks like it's working now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants