Browse Source

Only consider SelectionStartRow and SelectionStartColumn when SelectedLength is grater than 0.

BDisp 10 months ago
parent
commit
d3be2ac405
1 changed files with 2 additions and 2 deletions
  1. 2 2
      UICatalog/Scenarios/Editor.cs

+ 2 - 2
UICatalog/Scenarios/Editor.cs

@@ -369,9 +369,9 @@ public class Editor : Scenario
 
         if (_textView.SelectedLength > 0)
         {
-            line = _textView.GetLine (Math.Min (_textView.SelectionStartRow, _textView.CurrentRow));
+            line = _textView.GetLine (_textView.SelectionStartRow);
 
-            if (line [Math.Min (Math.Min (_textView.SelectionStartColumn, _textView.CurrentColumn), line.Count - 1)].ColorScheme is { } csSel)
+            if (line [Math.Min (_textView.SelectionStartColumn, line.Count - 1)].ColorScheme is { } csSel)
             {
                 return new (csSel.Focus);
             }