From 4e11c05935799050dbacbe689b47143ddee728eb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 15 Jul 2009 23:50:36 +0000 Subject: Remove duplicate carets after Delete or Backspace. Adding 1 to size returned for GetSelText so that container will allocate enough memory to hold \0 for empty selection. --- src/Selection.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/Selection.cxx') diff --git a/src/Selection.cxx b/src/Selection.cxx index 43607b244..1ea5f1bbe 100644 --- a/src/Selection.cxx +++ b/src/Selection.cxx @@ -310,3 +310,21 @@ void Selection::Clear() { ranges[mainRange].Reset(); rangeRectangular.Reset(); } + +void Selection::RemoveDuplicates() { + for (size_t i=0; i= j) + mainRange--; + } else { + j++; + } + } + } + } +} + -- cgit v1.2.3