Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fixed window jumping #8

wants to merge 2 commits into from

Conversation

Wintaru
Copy link

@Wintaru Wintaru commented Apr 19, 2018

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 Reviewable

Josh Donner added 2 commits April 19, 2018 07:44
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.
@Wintaru
Copy link
Author

Wintaru commented Apr 19, 2018

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.

@chrisgross
Copy link

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)))
Copy link
Owner

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)
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants