-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix term enabled behavior #1725
Conversation
Remove the startinsert and stopinsert pair; they cancel each other out and are unnecessary.
Window numbers are mutable; it's only window ids that don't change. When g:go_term_enabled=1, make sure that the window from which terminal commands are run is made active again regardless of the value of splitting options (e.g. 'splitright').
Codecov Report
@@ Coverage Diff @@
## master #1725 +/- ##
==========================================
+ Coverage 23.94% 24.91% +0.97%
==========================================
Files 57 57
Lines 4766 4761 -5
==========================================
+ Hits 1141 1186 +45
+ Misses 3625 3575 -50
Continue to review full report at Codecov.
|
if state.winnr !=# winnr() | ||
exe state.winnr . "wincmd w" | ||
endif | ||
call win_gotoid(state.winid) |
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.
is this a native nvim function?
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.
It is. We actually probably need to be using it many other places, but all the other cases where it should be used but isn't requires an unlikely edge case before a user would notice a problem. Because of the way the terminal works, though, we must use the window id instead of the window number to make sure the behavior is the same regardless of the value of splitright
.
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.
Thanks for the clarification.
lgtm |
Make sure that behavior is consistent when
g:go_term_enabled=1
regardless of the value of thesplitright
option.Remove the startinsert and stopinsert pair; they cancel each other out
and are unnecessary.
remove superfluous stderr callback.