Fix/20478 increase max line length - #20639
Conversation
…access#20478) virtualBuffers.maxLineLength has no enforced min/max in the config spec, but the SpinCtrl in the Browse Mode settings panel capped user input at 250. With screen layout navigation enabled, ordinary paragraphs regularly exceed 250 characters, causing browse mode to split lines more often than needed. Raised the SpinCtrl max from 250 to 4000. The value is only used as an int32 argument to VBuf_getLineOffsets, so there is no native buffer-size constraint this change would violate. Related: nvaccess#11717 (line-splitting can break controls mid-phrase; not addressed by this change, which only lifts the ceiling).
Increased maximum character limit for Browse Mode setting to reduce paragraph splitting.
|
Hi @Rasaec5 - did you read my comment here: #20478 (comment) |
Oh I am so sorry, I forgot as I was working late on this last night. I can get that changed and make a new pull request tonight or tomorrow. |
|
no need to open a new pull request. just push further commits to this one and mark it as ready for review |
per seanbudd changed 4000 to 1000
Updated the maximum character limit for the 'Maximum number of characters on one line' setting in Browse Mode from 250 to 1000 to reduce paragraph splits.
|
@seanbudd Sorry again for forgetting that, it is ready for review again |
|
In #20478 (comment) we suggested changing the min to 0, which sets a behaviour of no length capping (e.g. infinite). Can you please also document these changes in the user guide as requested. |
Updated the maximum and minimum values for the 'Maximum number of characters on one line' setting in Browse Mode settings.
Fixed the minimum value from 10->0 and updated the change log
|
I re-read all of the comments, and I went back through the contribution guide. Hopefully I didn't miss anything this time. Thank you for your time. |
|
Hi - we still need to update the user guide section for the setting |
|
@seanbudd Sorry, I was out of town for the weekend. I followed the Contribution Guide, but missed that the User guide needs to change. I will look at that tomorrow, and make sure that I set the user guide correctly. |
Link to issue number:
Closes #20478
Summary of the issue:
When browse mode uses screen layout navigation, ordinary paragraphs frequently exceed 250 characters. The "Maximum number of characters on one line" setting (
virtualBuffers.maxLineLength) is meant to control this, but the spin control in the Browse Mode settings panel capped user input at 250, so users couldn't raise the limit high enough to stop mid-paragraph line splitting.Description of user facing changes:
The "Maximum number of characters on one line" spin control in NVDA Settings → Browse Mode now accepts values up to 4000 (previously capped at 250). The minimum (10) is unchanged. This allows users with screen layout enabled to set a limit that better matches the length of paragraphs they encounter, reducing how often lines are split mid-paragraph.
Description of developer facing changes:
None. No public API, config schema, or module signatures changed.
Description of development approach:
virtualBuffers.maxLineLengthinsource/config/configSpec.pyalready has no enforced min/max (integer(default=100)); the only ceiling was theSelectOnFocusSpinCtrlinBrowseModePanel.makeSettings()(source/gui/settingsDialogs.py), hardcoded tomin=10, max=250. This PR raisesmaxto4000and adds a comment explaining why.Before making the change, I traced how the value is consumed:
source/virtualBuffers/__init__.pypasses it toNVDAHelper.localLib.VBuf_getLineOffsets, where it's declared as a plainc_int32insource/NVDAHelper/localLib.py— not tied to any fixed-size native buffer. So raising the ceiling introduces no structural risk on the native side.Scope is intentionally narrow: this only lifts the ceiling. It does not address the mid-phrase line-splitting behavior raised in the related issue #11717.
Testing strategy:
python3 -m py_compileon the modified file to confirm no syntax errors.tests/unit/for existing coverage ofBrowseModePanelormaxLineLength— none found, so there's no existing automated test to update.VBuf_getLineOffsetsto confirm no native fixed-size buffer is tied to the old 250 cap (see development approach above).scons source,runnvda.bat) and manually verified in the Browse Mode settings panel: the spin control accepts up to 4000, rejects/clamps values above 4000, the floor of 10 is unchanged, and the value persists across a restart.maxLineLengthraised and screen layout enabled, browse mode no longer splits long paragraphs at the old 250-character boundary; reducing it back to the default (100) restores the original splitting behavior, confirming the setting still controls line length correctly.rununittests.bat,runlint.bat,runcheckpot.bat, andrunlicensecheck.bat— all passed cleanly with no failures.Known issues with pull request:
None outstanding.
Code Review Checklist: