Doesn't work when buffer is not modifiable
Closed this issue · 4 comments
I tried to set up this with defx, but I constantly get an error that buffer is not modifiable. I tried in regular buffer, same error. Steps to reproduce:
- Open any file
- enter
set nomodifiable
in command line - call
actionmenu#example()
- Select any option
- See error in command line
I couldn't find what's causing this. Maybe you can.
Howdy @kristijanhusak! Thanks for finding this, and for detailing the steps to reproduce the error. I was indeed able to replicate it myself.
I've just pushed a commit to ensure the actionmenu buffer is always modifiable locally (which means it's able to open the actionmenu successfully).
Hoping this fixes your issue (I haven't used defx
before). I'm hoping/expecting that depending on what you're doing with the callback
, nothing should be trying to modify the buffer now.
@kizza thanks for the quick response. I tried it, and unfortunately it still happens.
Here's a screenshot:
Note that i'm using NeoVim latest from master. Maybe it is related to that.
Hmmm. When I followed the steps to reproduce I first got
So the actionmenu wouldn't even open! Now it opens (but yes, I get the same error after I select an option, even if the callback doesn't touch the buffer)
I was able to identify that "closing" the actionmenu window via a different method solved the problem for me
I can now run through your original steps to reproduce the error, select an item, close the window, run the callback - and all works fine. Hope you have the same experience too!
It's fixed now, thanks!