Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Avoid non-file windows for :Gstatus open
Closes #1002
- Loading branch information
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6faf165
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting an error in the following case:
Open a fresh instance of vim in a dirty repo. Edit a file, invoke
:Gstatus
and then:help
right after. Jump back to theGstatus
window and try and open a file. This is thrown:I've validated this with an empty vimrc and fugitive as my only plugin in vim 8.0 and 8.1.
Changing
winnrs[1]
on line 1434 towinnrs[0]
fixes this and works in a few other test cases I did, but I haven't fully grokked why you want the[1]
index.As an aside, I really like this way of doing checks on multiple windows. I'm pretty sure I can leverage this pattern to speed up some other stuff of mine. Thanks!
6faf165
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did mean
[0]
, guess I never tested the one actual window case. I blame Lua.6faf165
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, ha! Well, thanks a lot for doing this—it's much appreciated.