-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fixed window jumping #8
base: master
Are you sure you want to change the base?
Conversation
I know this is considered a bug in SublimeText, but the fix seemed simple enough. Thanks to fico for the code, which I found here: https://forum.sublimetext.com/t/change-language-lost-focus-annoying-behavior/18986/3
If you have the same file open in multiple groups, the previous fix wasn't enough, I think this is more robust now.
To further clarify, the changes in 74502bc fixed an issue where focus would be changed to the wrong view open and also sometimes caused position changes in the wrong view. |
If this works, I would love for this to be merged. The jumping is really annoying. |
group = window.active_group() | ||
x, y = a_view.viewport_position() | ||
|
||
print('group: {0}'.format(str(group))) |
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.
remove
|
||
# Restore the viewport position and selections. | ||
window.focus_group(group) |
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.
use extract the logic with restoring the position and selections into a context manager
I know this is considered a bug in SublimeText, but the fix seemed
simple enough. Thanks to fico for the code, which I found here:
https://forum.sublimetext.com/t/change-language-lost-focus-annoying-behavior/18986/3
This change is