easymotion / vim-easymotion

Vim motions on speed!
http://www.vim.org/scripts/script.php?script_id=3526
7.44k stars 357 forks source link

Triggering Easymotion with unmodifiable buffer open breaks nvim #489

Open Evilbits opened 1 year ago

Evilbits commented 1 year ago

Desciption Having an unmodifiable buffer, in this case Chadtree, open while triggering a search causes an exception to be thrown.

Error detected while processing function EasyMotion#OverwinF[4]..EasyMotion#overwin#move[1]..<SNR>185_move[2]..444[1]..445[10]..function EasyMotion#OverwinF[4]..EasyMotion#overwin#move[1]..<SNR>185_move[2]..444[1]..445[7]..448[20]..452[2]..458[26]..<SNR>185_throw:
line    1:
E605: Exception not caught: vital: HitAHint.Motion: function EasyMotion#OverwinF[4]..EasyMotion#overwin#move[1]..<SNR>185_move[2]..444[1]..445[7]..448[20]..452[2]..458[6]..454[3]..<SNR>185_setline, line 2 Vim(call):E21: Cannot make changes, 'modifiable' is off
Error detected while processing function EasyMotion#OverwinF:
line    4:
E171: Missing :endif

Is there a way to ignore a certain buffer from the search? That could resolve the issue.

How to reproduce

  1. Install Chadtree and vim-easymotion
  2. Open Chadtree buffer
  3. Trigger a search
  4. Search for any key that is highlighted within the unmodifiable window