gv.vim icon indicating copy to clipboard operation
gv.vim copied to clipboard

Refresh git log buffer with `r`

Open BertrandSim opened this issue 4 years ago • 2 comments

In a GV buffer, hit r to refresh the git log print out.

This achieves the same goal as (#53), but uses a different implementation.

In particular:

  • Hitting r will call s:refresh().
  • s:refresh() first empties the current GV buffer, then s:fill()s it with the same git_log_cmd
  • git_log_cmd is changed to be a buffer-local variable (b:), so that one can reuse the same git log command for the same buffer.

The third point enables s:refresh() to be used with multiple GV instances. In addition, other split windows (such as the diff window) are also preserved in the current tab.

BertrandSim avatar Jun 10 '21 04:06 BertrandSim

rebased on latest master

BertrandSim avatar Aug 31 '21 07:08 BertrandSim

I merged this with #48 on my fork (https://github.com/somini/gv.vim). This stores the command on the existing metadata dict at b:gv.

somini avatar Oct 17 '21 11:10 somini