tomtom / quickfixsigns_vim

Mark quickfix & location list items with signs
http://www.vim.org/scripts/script.php?script_id=2584
GNU General Public License v3.0
131 stars 13 forks source link

Reload/reset signs after `Gcommit` etc #46

Closed blueyed closed 10 years ago

blueyed commented 10 years ago

When using :Gcommit from fugitive, I would like to reset the cache(s) for all VCS signs.

How would that get achieved?

tomtom commented 10 years ago

Does call QuickfixsignsSet('', ['vcsdiff']) help?

pjrt commented 10 years ago

That does clear them, but shouldn't they clear out on the normal events? (BuffEnter, InsertEnter, etc)? They seem to stay around for me.

tomtom commented 10 years ago

That does clear them, but shouldn't they clear out on the normal events? (BuffEnter, InsertEnter, etc)? They seem to stay around for me.

Of course they should, don't they?

I assumed the OP wants immediate feedback and doesn't want to wait for the next scheduled update.

pjrt commented 10 years ago

Unn, strange, I used to be able to reproduce it not clearing out after commit (had to close and open vim) yesterday. But I can't reproduce it anymore.

I'll keep an eye out.

pjrt commented 10 years ago

Ah, I was able to reproduce it, but only in MacVim (have not tried gvim).

Test Case:

vim (mvim) version 7.3

However, normal vim (in the terminal) works fine.

blueyed commented 10 years ago

Does call QuickfixsignsSet('', ['vcsdiff']) help?

This works for me. IIRC fugitive calls some user autocommand, which quickfixsigns then could listen for (or the user in their config).

tomtom commented 10 years ago

IIRC fugitive calls some user autocommand, which quickfixsigns then could listen for (or the user in their config).

Do you have any details? I wasn't able to find out which user event would be triggered by Gcommit.

tomtom commented 10 years ago
  • Get some code in version control
  • Edit the code (notice the marks come up) and save in MacVim
  • Commit the code
  • Go back to MacVim, notice the marks are still there.
  • Save the file, marks don't go away

Ok, I think I understand the problem.

pjrt commented 10 years ago

That seems to have fixed it. Thanks!

blueyed commented 10 years ago

@tomtom The initial issue has not been fixed (reloading signs after a fugitive command / :Gcommit), has it?

As stated in https://github.com/tpope/vim-fugitive/issues/458#issuecomment-39000900, it would probably work to hook into ShellCmdPost.

tomtom commented 10 years ago

You can add ShellCmdPost to g:quickfixsigns_class_vcsdiff.event if you really want to. I don't think I would want to make this a default though since it assumes a certain workflow. IMHO fugitive should define a User event and trigger that one in #reload_status() or whatever. This would also solve your problem with Gwrite, I guess.