[VsIntegration] Fix Max Entries completion option resetting to 25 - #2088
Merged
RobertvanderHulst merged 1 commit intoSep 23, 2026
Merged
Conversation
XSUserControl.ReadControl only accepted values strictly below the NumericUpDown Maximum and otherwise fell back to Minimum. Saving the maximum (1000) therefore showed 25 on the next load, and pressing OK persisted 25. The value is now clamped to [Minimum, Maximum]. Also raise the Max Entries maximum from 1000 to 10000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
XSUserControl.ReadControl: when loading a savedintinto aNumericUpDown, the value was only accepted ifMinimum <= value < Maximum; anything else fell back toMinimum. The value is now clamped to[Minimum, Maximum].Max Entriesmaximum is raised from 1000 to 10000.Why
On Tools → Options → X# → Completion, setting Max Entries to 1000 (or higher, which the control caps at 1000) showed 25 the next time the page was opened. The
< Maximumcheck treated the maximum itself as out of range. Pressing OK then saved 25, so the setting really changed, not only the display.The fix is in the shared base class, so it applies to every
NumericUpDownon the X# options pages.Notes for reviewers
XDatabase.prgstop reading once the limit is reached, so the cost only grows when there really are that many matches, for example a very short prefix in a large VO solution.LIMIT. Several loops drop rows after the query (StartsWithafterLIKE, where_is a wildcard; empty namespaces), soLIMIT Nwould silently return fewer than N matches.