chrisbra / Recover.vim

A Plugin to show a diff, whenever recovering a buffer
http://www.vim.org/scripts/script.php?script_id=3068
248 stars 25 forks source link

Screen not shown #59

Closed DerWeh closed 5 years ago

DerWeh commented 6 years ago

I recently switched from NVIM v0.2.0-1171-g4566f7c to NVIM v0.3.1-1-g489d32f2b.

Now, after starting the plug-in only shows an empty screen. Pressing i still triggers the diff. If I press <ESC> the usual info screen appears.

chrisbra commented 6 years ago

so when editing a file for which a swap file exists, it won't show you the Attention dialog?

chrisbra commented 6 years ago

(even without the plugin I mean)

DerWeh commented 6 years ago

It shows the dialog without the plug-in. With the plug-in it shows nothing, however the mappings still work. Pressing <ESC> gives you the normal dialog, which you see without the plug-in.

chrisbra commented 6 years ago

I would report it to the neovim devs so. I am not sure what to do with this here (or how to fix it, putting a redraw somewhere?)

DerWeh commented 6 years ago

I have no idea either, as I don't really know how vim works. Thought you might have an idea what could be wrong. Then I will just open an issue at Neovim.

reduxionist commented 6 years ago

This was happening to me on neovim 0.3.0 and 0.3.1, but upgrading to 0.3.2 has resolved the issue.

Correction: though clearly a neovim issue, it is not solved by the upgrade to 0,3,2. :frowning_face:

Rich-YoYo commented 5 years ago

I've just come across this problem myself. I thought it might be something to do with the lazy redraw option but after disabling that, the problem persists. I traced the point of failure to autoload/recover.vim, line 181 - "let p = confirm(info, cmd, (delete ? 7 : 1), 'I')". If I return just before this, the normal dialogue is displayed. If I return just after this, I get the blank screen. No idea of the significance of this, but just thought I would let you know; it looks like the 'confirm' command is hanging

Update: Looking at the neovim buglist, it looks like there have been a few issues regarding use of confirm(). I tried to write a work-around using inputlist() instead, but that also doesn't work (though in a different way - the call seems to be completely ignored). Also, it seems that calling confirm() too soon on startup could also be an issue for neovim (which, I'm guessing may happen if you specify a file on the command line); there are suggestions that such use should not be allowed (which doesn't bode well for this plugin, I'm thinking)

chrisbra commented 5 years ago

Hm, I guess on Vim it works well? If you insert a

:redraw
:echo msg

right above the let p = confirm(info, cmd, (delete ? 7 : 1), 'I') line, does that change anything?

Rich-YoYo commented 5 years ago

On Mon, 21 Jan 2019 09:55:29 -0800 Christian Brabandt notifications@github.com wrote:

Hm, I guess on Vim it works well? If you insert a

:redraw
:echo msg

right above the let p = confirm(info, cmd, (delete ? 7 : 1), 'I') line, does that change anything?

I'm afraid that doesn't help. And yes, it works find in vim.

regards

Rich

chrisbra commented 5 years ago

I tested 493d80e locally with nvim 0.2.2 and latest neovim appimage snapshot NVIM v0.3.2-909-g85761dd42 and commit 493d80e fixes it for me.