-
-
Notifications
You must be signed in to change notification settings - Fork 32
Added toggle support for left/right positioned previews #65
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
Added toggle support for left/right positioned previews #65
Conversation
|
I will review this when I get a chance, but I am curious if you verified that switching back and forth introduces no issues? Does it all clean up proper? |
|
Yea, when I update the settings, all previews are wiped and don't update until I focus back on the view |
|
That's good, I couldn't remember if I reloaded all the previews when specific setting values change or all values. If this is all that is needed, I probably won't have an issue with this. I am glad I went the route of any value in the settings file changes. Can you update the documentation to talk about the new setting, that would be good too. |
|
Added new documentation |
color_helper.py
Outdated
| sublime.status_message('File color indexer started...') | ||
|
|
||
| def preview_is_on_left(): | ||
| """Return boolean for positioning preview on left/right""" |
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.
You will need to resolve the lint error here by adding a period to the comment's end. Any errors showing in lint that weren't introduced by you can be ignored. Sometimes flake8 updates and introduces previously missed errors.
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.
This has already been resolved in 2c99c81 . Travis CI caught it and I patched it =/
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 know, I actually made the comment before you fixed it but finished the review yesterday.
| end_scope = view.scope_name(src_end - 1) | ||
| rgba = RGBA(mdpopups.scope2style(view, scope)['background']) | ||
| rgba.invert() | ||
| color = '<a href="%d">%s</a>' % ( |
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.
You can't use pt anymore for href, you need to use src_start. Line #1191.
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.
Ah, nice catch
|
I think that's everything. Thanks for looking into this. |
|
Now that is landed, when should we anticipate a corresponding |
|
Don't know, depends if I feel I have time to look into the duplication bug or not. If I do, maybe after that, if not, then before that. I've been pretty busy recently. I would say no not this week though, but maybe next. |
|
Released |


As discussed in #64, adding left/right positioning support solves cursor jump issues. In this PR:
inline_preview_positionNotes:
I haven't squashed this branch as GitHub now supports squashing commits. If you would like me to still squash it (e.g. to merge outside of GitHub), I'm fine with doing that.