-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Set _fontSizePrefsLoaded to true before calling _adjustFontSize. #6481
Comments
Comment by TomMalbran The idea behind that flag is that the last time you save the scroll position it is saved using the new font size. When the font size is 15px, line 100 is roughly around 165px, but is at 115px when the font size is 10px. So I change the font size to 15px, and then scroll to line 100 and restart Brackets. The scroll was saved at 165px, so when I restore the scroll position, I know I need to use the saved scroll and not change it. If instead I readjusted the scroll, it would be way off. I tried your changes without the zoom and the scroll is way off after restarting Brackets. |
Comment by redmunds This is much better for recipe #7093 . Using ProjectManager.js (2255 lines):
So, this seems to fix the second problem in this comment, but not the first problem. |
Comment by RaymondLim
|
Comment by redmunds
|
Comment by TomMalbran The real issue here is that on the initial load the scroll position is restored before restoring the font size. So if the scroll was at the end of a file before restarting, when restarting, on the original font-size, the saved scroll is higher than the length of the document, so it doesn't scroll to the saved one, and when later the font is increased, the scroll is in the wrong position. The same is what happens with issue #7168. But there is another issue with wordwrap on, when you are just trying to increase the font size. Once a line lower than the visible one wraps into 2 lines, the restored scroll will be off by 1 line. |
Comment by RaymondLim Closing as this is not the correct fix. |
Issue by RaymondLim
Tuesday Mar 11, 2014 at 21:14 GMT
Originally opened as adobe/brackets#7165
This change fixes the issue #7093 since the flag has to be true in order to set the scroll position to the right location.
@
TomMalbran Can you review this since you're the one who works on this area a lot?Note that this specific issue is also introduced by recent CodeMirror update. If I use the CodeMirrror version from sprint-36, then I don't see the issue even if I'm running in the master b64a2a15b with the new view state settings implementation.
RaymondLim included the following code: https://github.com/adobe/brackets/pull/7165/commits
The text was updated successfully, but these errors were encountered: