-
Notifications
You must be signed in to change notification settings - Fork 189
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
Bug report: vim search mode would leak delete key #976
Comments
I'm able to reproduce this in 0.9.0 as well. I'm seeing the issue any time the cursor is supposed to be focused in the vim command line. I thought perhaps it was related to one of my (many) browser extensions, but after disabling them all the input focus shift persists. Specifics:
Expected: send the keystrokes to the (focused) vim command prompt rather than the main editor itself |
Probably related. I've had cases where when I press G to go to the last line in normal mode, it would just enter that into the editor. |
Silverbullet is based on codemirror, but this demo doesn't have this bug: https://codemirror.net/5/demo/vim.html. That demo is for an older version though. |
The standard keymap conflicts with the vim mode, e.g. not allowing arrow keys to move through the vim commandline for `/` and `:` commands. The keys described in https://codemirror.net/docs/ref/#commands.standardKeymap seem to work just fine without it in vim mode. Fixes silverbulletmd#976
The standard keymap conflicts with the vim mode, e.g. not allowing arrow keys to move through the vim commandline for `/` and `:` commands. The keys described in https://codemirror.net/docs/ref/#commands.standardKeymap seem to work just fine without it in vim mode. Fixes #976
This broke the Enter key in insert mode for ordinary paragraphs. Workaround: Go back to command mode and hit I think this is caused by replit/codemirror-vim#182. |
Thanks a lot @lutzky for the long waited fix! I've tested the latest commit and it works on my instance. But one thing I still find not really reasonable for a long term vim user is the del key in the normal mode still deletes in the original text instead of just moving backward. I think it is pretty annoying and not intended for vim usage. Do you see a way to make this behavior consistent with vim's behavior? Technically it doesn't belongs to this bug but I would assume these are relevant and could be fixed with similar manner. |
@LumenYoung interesting, I hadn't noticed that. This cannot be fixed in the same manner as it reproduces in the codemirror-vim demos (v5, v6). Interestingly, I don't see this posted on https://github.com/replit/codemirror-vim/issues?q=is%3Aissue+delete. |
Ah, thanks for the knowledge. Emm, this is pretty annoying and I will file a report to the codemirror team. I think these kind of problem really gives me a sense of unstability when writing on the silverbullet but with your patch it is already getting better. Thanks! |
Hey @lutzky, I've tried the v6 demo here https://raw.githack.com/replit/codemirror-vim/master/dev/web-demo.html and I can't reproduce this problem. Can you verify again that you can delete the character in normal mode when hovering above them and hit |
As suggested in the title, I find this potential bug, and it is easy to reproduce on my side
/
to enter search modeExpected behavior: the character in search should be delete
Current behavior: the searched content is not deleted, rather the character under the cursor is deleted.
SB Version: 0.8.1
The text was updated successfully, but these errors were encountered: