Skip to content

Commit

Permalink
Fixes #774 (#775)
Browse files Browse the repository at this point in the history
* Fix replace selected text with longer pasted text bug #774
  • Loading branch information
MrChebik authored and Jugen committed Nov 4, 2018
1 parent 17a7957 commit 04b9ada
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ public SelectionImpl(String name, GenericStyledArea<PS, SEG, S> area, int startP
? indexOfChange
: finalEnd + netLength;
}
if (finalStart > finalEnd) {
finalStart = finalEnd;
}
} else {
// force-update internalSelection in case empty selection is
// at the end of area and a character was deleted
Expand Down

0 comments on commit 04b9ada

Please sign in to comment.