From c9818d550d8c64f924a3ebf5c65c2e76ccbdedb6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 8 May 2000 08:29:41 +0000 Subject: Fixed bug in deleting and changing case of rectangular selections. --- src/Editor.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index ab65382b3..7827c84a4 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1348,8 +1348,7 @@ void Editor::ClearSelection() { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); int startPos = SelectionStart(); - int line; - for (line=lineStart; line <= lineEnd; line++) { + for (int line=lineEnd; line >= lineStart; line--) { startPos = SelectionStart(line); unsigned int chars = SelectionEnd(line) - startPos; if (0 != chars) { @@ -1782,7 +1781,7 @@ void Editor::ChangeCaseOfSelection(bool makeUpperCase) { if (selType == selRectangle) { int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); - for (int line=lineStart; line <= lineEnd; line++) { + for (int line=lineEnd; line >= lineStart; line--) { pdoc->ChangeCase( Range(SelectionStart(line), SelectionEnd(line)), makeUpperCase); -- cgit v1.2.3