tommcdo / vim-fugitive-blame-ext

Extend tpope/vim-fugitive to show commit message on statusline in :Gblame
53 stars 2 forks source link

Display commit message when :Gblame is first called #1

Open tommcdo opened 10 years ago

tommcdo commented 10 years ago

Message is currently only displayed when the cursor is moved, so it does not show the message for the commit under the cursor when the blame window is initially opened. I've tried adding the BufEnter event, but it causes a noticeable flicker -- it seems that the git command runs before fugitive gets a chance to set nowrap and scrollbind.

kassio commented 7 years ago

I tried with the BufReadPost, and it seems to work fine. 😊

kassio commented 7 years ago

No, actually it shows a wrong message, sorry.. :(

tommcdo commented 7 years ago

Yeah, this one is tricky because I think other :autocmds from fugitive.vim are involved, so getting the timing right is difficult.

Maybe the solution is to get this built into fugitive.vim itself :P

kassio commented 7 years ago

I think it's a good suggestion, wdyt to open a PR on the original? 😄

tommcdo commented 7 years ago

Actually, this plugin is sort of a proof-of-concept for a feature request I opened a long time ago. @tpope has a similar feature implemented on a branch, so maybe he needs some encouragement to merge it in :smile: