aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2009-06-27 06:02:37 +0000
committernyamatongwe <devnull@localhost>2009-06-27 06:02:37 +0000
commit17f795653b20e1986f3d69892f8a822e1fbb72c1 (patch)
tree61e132754d45e1f6c080d2ba7ec8922e984455fc
parentbcd9472fa2b80687a08d35aad2bf19dc14bca2b8 (diff)
downloadscintilla-mirror-17f795653b20e1986f3d69892f8a822e1fbb72c1.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++;
}