From 886b9dcd6dd529920ca515392ceb331e617d8506 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 27 Jun 2009 06:02:37 +0000 Subject: Fix bug in rectangular paste where short lines were not being space filled as much as needed. --- src/Editor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index ccfa067e8..6f7e6eb4b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3677,7 +3677,7 @@ void Editor::PasteRectangular(int pos, const char *ptr, int len) { // Pad the end of lines with spaces if required currentPos = PositionFromLineX(line, xInsert); if ((XFromPosition(currentPos) < xInsert) && (i + 1 < len)) { - for (int i = 0; i < xInsert - XFromPosition(currentPos); i++) { + while (XFromPosition(currentPos) < xInsert) { pdoc->InsertChar(currentPos, ' '); currentPos++; } -- cgit v1.2.3