incorrect line highlighting in insert mode
when a line character is selected in insert mode it is only half a character long and selects until the next line if the next line is a newline. See vid for details.
https://user-images.githubusercontent.com/50090107/122506254-f32c2780-cfcb-11eb-9e6f-a134e0a64a9f.mp4
This is a massive issue for me. I don't even like the left-over selection when going back to insert mode. I tried to remove it with selections.reduce but it still leaves a trail.
However, this one is even more annoying and is triggered all the time. Helix leaves no trail on a single character when going to insert mode. Here I can't find a way to go to insert mode without a trail. This trail on a newline also happens when using o as well.
Hello, and sorry for the late response.
@jbytes1027 How would you expect things to look? IIRC "fake selections" (such as those left when entering insert mode) are a decoration with the same range as the previous (normal) selections, so the difference in display comes from VS Code. VS Code APIs don't give Dance the ability to precisely highlight "fake selections", but it might be possible to make things a bit better (by abusing styling allowed by decorations, and even that is not sure).
@wmstack You can prevent selections from being saved by configuring the normal mode as follows:
"dance.modes": {
"normal": {
"onLeaveMode": [
".selections.reduce",
],
},
},
Does that work for you?
Hello, and sorry for the late response.
No worries, but I switched to vim awhile ago so this doesn't bother me anymore. Don't work on this because I asked.
How would you expect things to look
Don't remember, but I was using kakoune as a reference.
Well it works but it has a few issues, for one, the yank-delete-insert command associated with the c keybinding in normal mode only deletes a single character, the one that the cursor is on...
Yank-Delete-Insert can be fixed using some keybinding. I don't really prefer if the c command copies the selection so I have it mapped as
keybindings.json
{
"key": "c",
"command": "runCommands",
"args": {
"commands": ["dance.edit.delete", "dance.modes.insert.before"]
},
"when": "dance.mode == 'normal'"
}
Another issue is that the selection is gone when going into select mode, which is undesirable.