oni icon indicating copy to clipboard operation
oni copied to clipboard

some digraph cause oni trapped in insert mode.

Open dedowsdi opened this issue 8 years ago • 5 comments

-) will cause oni trapped in insert mode, i have to reopen oni every time it happens. (- not works at all.

dedowsdi avatar Apr 10 '18 00:04 dedowsdi

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Apr 10 '18 00:04 oni-bot

Hi!

Can I check a few things first? The version of Oni/OS and perhaps your keyboard layout would be useful.

Also, when you say -) will cause Oni to become trapped in insert mode, do you mean just typing -) into the editor causes this? A repro might be useful too, if its not too awkward to do.

CrossR avatar Apr 11 '18 11:04 CrossR

ubuntu 16.04.4 oni0.3.2 type i<Ctrl-k>-) to reproduce the problem: Esc or space won't work after the bug trigged, only alt+f4 works.

alt text

dedowsdi avatar Apr 13 '18 08:04 dedowsdi

I've not managed to repro this exactly the same as you, but I have managed to get something which is probably the same.

Repro:

  • Enter insert mode
  • <Ctrl-r> and then " which should paste the contents of " (I think?)
  • Instead get stuck in insert mode.

I assume neovim then gets stuck in a weird mode either waiting to send something back, or it has sent it and we aren't dealing with it.

With "debug.showTypingPrediction": true, which will highlight typing predictions (ie Oni side typing that hasn't been confirmed by nvim yet), I can see all the typing is then Oni specific, so there is definitely something odd going on.

For my issue at least it is seemingly auto closing pairs related, since if I remove " from my auto close config, it works again. Similarly, it breaks on ' so its probably some logic relating to when the start and end are the same character.

Doesn't quite help you @dedowsdi ...since ) doesn't fit into that category, but I'd be interested to see if you can repro this with "autoClosingPairs.enabled": false, in your config.

EDIT: Whoops! Have managed to repro yours exactly, I had rebound <Ctrl-k> in Oni, only just remembered. Setting "autoClosingPairs.enabled": false, does stop the issue though, so I think we can say its something to do with that.

CrossR avatar Apr 15 '18 18:04 CrossR

@CrossR You are totally right. This bug only triggered when autoClosingPairs is enabled.

dedowsdi avatar Apr 15 '18 23:04 dedowsdi