-
Notifications
You must be signed in to change notification settings - Fork 8.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
Terminal uses system default for number of rows scrolled at a time. Can be overridden in settings file. #3575
Terminal uses system default for number of rows scrolled at a time. Can be overridden in settings file. #3575
Conversation
…ber of rows scrolled at a time. Default was hardcoded to 4. 1 works better on precision touchpads.
…nnesne/configure_rows_scrolled
…/hannesne/terminal into hannesne/configure_rows_scrolled
…'s not overridden in settings.
I've done it! The terminal will now use the system setting for lines scrolled. This can be overridden by specifying a value in the app settings file. If the value specified is 0, terminal will use the system setting. cc @mdtauk |
… focus, not on every scroll event. More efficient.
(Sorry for the silence here! We've been trying to stay on top of our PR backlog, but with the November-December holiday seasons here in the US our velocities aren't as great as we'd like.) |
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.
Personally don't like that 0
or null
are considered the system setting. I'd prefer something like "system"
for the system setting or a number for the number. We should probably just invalidate the profile if 0
or null
are passed in. Then throw a warning? @DHowett-MSFT @cinnamon-msft thoughts?
Also, please update the following too:
@carlos-zamora I've implemented all the other requested changes. |
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.
Largely I really like this - I just think we need to move the SystemParametersInfo
call to where we're parsing instead of in TermControl
.
I'd similarly prefer that we use "system"
to indicate using the system scroll amount, as opposed to null
/0
, but that can always be done in a follow-up PR.
…e of 'system' for default in settings.
I didn't like calling the system for the setting in the termcontrol either, so I've changed it now so that the globablappsettings will assign 0 to the internal value if anything other than a non-zero int value is in the settings when parsing the settings file (the default is now "system"). The terminal settings will then in the accessor determine if a valid setting is provided, falling back to the system setting. The terminal control will update it's internal value using that accessor when settings change and when it receives focus so that you don't have to restart the terminal when you change the system setting. @zadjii-msft |
Not going to override @carlos-zamora because I don't see an answer to the thing he specifically asked of @DHowett-MSFT and @cinnamon-msft regarding using the 0/null state for "get system default". |
@carlos-zamora requested changes have been addressed by making "system" the default option in the settings file. Any value that is not 0 or an integer (null, "system", or not specified) will default to using the system setting. cc @miniksa |
Ah alright. Sorry, that wasn't clear to me sooner. Also, I checked the calendar and @carlos-zamora isn't due back for another week, so I'm going to clear his review and merge this. |
He's OOF and his issues have been addressed, as far as I can discern.
Thank you for the support @miniksa ! :) |
"globals": { | ||
"alwaysShowTabs": true, | ||
"initialCols" : 120, | ||
"initialRows" : 30 | ||
"initialRows" : 30, | ||
"rowsToScroll" : 4, | ||
} |
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'm not sure why this wasn't picked up by the build bot, but this test now fails for me when run locally because of the trailing comma (that's not valid JSON).
🎉 Handy links: |
I'm running v0.8.10091.0, but the setting is not visible in the default (generated) settings JSON. Was it forgotten to be added there or is the auto-generation of the default setting value not implemented...? Basically, people don't know the setting exists until they stumble upon this PR or the accompanying issue. |
Hey @hannesne! It looks like somebody came through and fixed the scroll wheel deltas, which obviates the need for I can send you a release build from master if you want to give it a test. Should we revert this feature, or change the key name so users who set |
I'm confused here. The v1.5.3142.0 release notes said:
But the config schema docs tell me that Unfortunately the config docs seem to be right. No matter what (numeric) value I set, I only get three lines of Running v1.5.3242.0 here. |
@yogan - you can now set
|
Perfect! Just what I was looking for. Thanks @Don-Vito! Maybe add a hint like that to the docs of the global |
The terminal will use the system setting to determine the number of lines to scroll at a time.
This can be overridden by adding rowsToScroll to app global settings file.
terminal will use the system setting if the app setting is 0, or not specified. No restart is needed to reflect setting changes in system or the settings file.
The default was hardcoded to 4 in the code with a todo comment. 1 works better on precision touchpads, where 4 scrolls too fast.
Validation Steps Performed
Example of profiles.json file: