junegunn / gv.vim

A git commit browser in Vim
1.35k stars 54 forks source link

Fix windows split: do not open a new window even if gv window was moved #117

Closed wookayin closed 10 months ago

wookayin commented 10 months ago

Problem: When reusing the splitted window to show a commit (that has w:gv = 1), only the rightmost window (winnr = '$') is considered. This results in a weird behavior that, if the window is moved to top or left, another window will be opened in split.

Solution: Search all the windows in the current webpage to find the target window with w:gv = 1.

wookayin commented 10 months ago

Applied your patch -- please feel free to squash when merging.

junegunn commented 10 months ago

Merged, thanks!