aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2009-06-27 06:02:37 +0000
committernyamatongwe <unknown>2009-06-27 06:02:37 +0000
commit886b9dcd6dd529920ca515392ceb331e617d8506 (patch)
tree61e132754d45e1f6c080d2ba7ec8922e984455fc
parentd2a67139ab3f45aff3d321a5d56a622af87081df (diff)
downloadscintilla-mirror-886b9dcd6dd529920ca515392ceb331e617d8506.tar.gz
Fix bug in rectangular paste where short lines were not being space filled
as much as needed.
-rw-r--r--src/Editor.cxx2
1 files changed, 1 insertions, 1 deletions
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++;
}