bug at Editor::PasteRectangular, // Pad the end of lines with spaces

0 views
Skip to first unread message

haimag

unread,
May 8, 2009, 7:27:08 AM5/8/09
to scintilla-interest
A bug at scintilla/src/Editor.cxx


should changed these lines :

// 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++) {
to :

// Pad the end of lines with spaces if required
currentPos = PositionFromLineX(line, xInsert);
if ((XFromPosition(currentPos) < xInsert) && (i + 1 < len)) {
while ( 0 < xInsert - XFromPosition(currentPos) ) { // fixed

haimag ren

unread,
Jun 25, 2009, 10:20:41 AM6/25/09
to scintilla-interest
the bug has not fixed in cvs .

2009/5/8 haimag <hai...@gmail.com>

Neil Hodgson

unread,
Jun 25, 2009, 9:34:13 PM6/25/09
to scintilla...@googlegroups.com
haimag ren:

> the bug has not fixed in cvs .

What is the effect of the bug?

Neil

haimag ren

unread,
Jun 26, 2009, 2:43:17 AM6/26/09
to scintilla...@googlegroups.com

the code
         " for (int i = 0; i < xInsert - XFromPosition(currentPos); i++) {"
pad space smaller than expected, should pad space till
       " 0 < xInsert - XFromPosition(currentPos)"
not    "i < xInsert - XFromPosition(currentPos)"





2009/6/26 Neil Hodgson <nyama...@gmail.com>

Neil Hodgson

unread,
Jun 27, 2009, 2:30:45 AM6/27/09
to scintilla...@googlegroups.com
haimag ren:

> the code
>          " for (int i = 0; i < xInsert - XFromPosition(currentPos); i++) {"
> pad space smaller than expected, should pad space till
>        " 0 < xInsert - XFromPosition(currentPos)"
> not    "i < xInsert - XFromPosition(currentPos)"

OK, it wasn't apparent when pasting near beginning of line. Committed.

Neil

Reply all
Reply to author
Forward
0 new messages