summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Buffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Text_Buffer.cxx')
-rw-r--r--src/Fl_Text_Buffer.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx
index caf4b3839..3bb8a10f0 100644
--- a/src/Fl_Text_Buffer.cxx
+++ b/src/Fl_Text_Buffer.cxx
@@ -1406,11 +1406,11 @@ int Fl_Text_Buffer::insert_(int pos, const char *text, int insertedLength)
/*
Remove a string from the buffer.
Unicode safe. Start and end must be at a character boundary.
+ Start must be less than end.
*/
void Fl_Text_Buffer::remove_(int start, int end)
{
- /* if the gap is not contiguous to the area to remove, move it there */
-
+ if (start >= end) return;
if (mCanUndo) {
if (mUndo->undoat == end && mUndo->undocut) {
// continue to remove text at the same cursor position