Skip to content

Commit

Permalink
Merge pull request #7951 from mbien/output-selection-at-zero-fix_deli…
Browse files Browse the repository at this point in the history
…very

OutputWindow: text selection can start at index 0.
  • Loading branch information
ebarboni authored Nov 13, 2024
2 parents e0f5934 + 206da8e commit 6ea89fa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public String getSelectedText() {
int start = getSelectionStart();
int end = getSelectionEnd();
String str = null;
if (start > 0 && end > start) {
if (start >= 0 && end > start) {
try {
str = getDocument().getText(start, end - start);
} catch (BadLocationException ex) {
Expand Down

0 comments on commit 6ea89fa

Please sign in to comment.