diff --git a/src/VisualStudio/LanguageService/OptionsPages/CompletionOptionsControl.Designer.cs b/src/VisualStudio/LanguageService/OptionsPages/CompletionOptionsControl.Designer.cs index 397799437c..a9e02c5b6f 100644 --- a/src/VisualStudio/LanguageService/OptionsPages/CompletionOptionsControl.Designer.cs +++ b/src/VisualStudio/LanguageService/OptionsPages/CompletionOptionsControl.Designer.cs @@ -278,7 +278,7 @@ private void InitializeComponent() // this.tbMaxEntries.Location = new System.Drawing.Point(104, 141); this.tbMaxEntries.Maximum = new decimal(new int[] { - 1000, + 10000, 0, 0, 0}); diff --git a/src/VisualStudio/LanguageService/OptionsPages/XSUserControl.cs b/src/VisualStudio/LanguageService/OptionsPages/XSUserControl.cs index 2d169f7cca..e3fe4d77f7 100644 --- a/src/VisualStudio/LanguageService/OptionsPages/XSUserControl.cs +++ b/src/VisualStudio/LanguageService/OptionsPages/XSUserControl.cs @@ -24,7 +24,7 @@ private void ReadControl(Control c, object options) } if (c is NumericUpDown number && val is int iValue) { - number.Value = iValue >= number.Minimum && iValue < number.Maximum ? iValue : number.Minimum ; + number.Value = Math.Max(number.Minimum, Math.Min(number.Maximum, iValue)); } if (c is TextBox tb) {