Conversation
477df61 to
e2f28cb
Compare
|
Fixed issues where it didn't work gv was the only tab. Took justinmk's suggestion to use tab-local variables and figured out why buffer-local wasn't working (need to define them from the tab and not before the tab opens). Should work with multiple gv tabs open. I'm using gv_opts instead of gv.opts because gv doesn't exist (@justinmk were you referring to something already existing?). Can switch if nested is preferred (looks like junegunn usually prefixes instead of nests). |
|
Removed trailing whitespace. |
|
What happened here? Has this been abandon? |
|
@sodapopcan I use it regularly, but it triggers #84. (I thought I introduced that bug, but turns out it exists in gv without this PR.) Probably best to fix that bug before merging this change, but this works well enough for me so I'm not motivated to debug it. |
well, For reference, #48 also makes use of |
Stores GV's options, closes tab, re-runs GV. Doesn't maintain current diff window, but does maintain current line position. Seems like a good trade-off for a simpler solution. Mapped to 'r' like fugitive's :Gstatus. (Instead of 'u' like gitv.) Implemented as a plug because I personally prefer C-l for refresh-like actions (and have already mapped r to cycle refs like gitv). Store restore variables in buffer instead of tab because if you :GV and then :wincmd T, then the t: variables disappear. I can't think of a way we'd lose the buffer. We create the new buffer with the old buffer's arguments, so they're still pointing to the right ones.
|
Squashed the commits and rebased on latest. |
As far as I can tell, there's no way to refresh git state (if I create a branch with
:Git br hihi), so I added one.Limitation: only works on one gv instance. I tried using b: instead of s: and it still didn't work (the variable no longer exists on old gv instances?) so I gave up.
Stores GV's options, closes tab, re-runs GV.
Doesn't maintain current diff window, but does maintain current line
position. Seems like a good trade-off for a simpler solution.
Mapped to 'r' like fugitive's :Gstatus. (Instead of 'u' like gitv.)
Implemented as a plug because I personally prefer C-l for refresh-like
actions (and have already mapped r to cycle refs like gitv).