Fix line end movement on display lines when EOLs are visible
Closes #712. X-Scintilla-Bug-URL: http://sourceforge.net/p/scintilla/bugs/1772/ X-Scintilla-Commit-ID: 2ce775c433b4910f2fde53c4b5d89bb16b45e3eb
This commit is contained in:
parent
a1145c6ef6
commit
c21db7d80c
@ -711,12 +711,14 @@ int EditView::StartEndDisplayLine(Surface *surface, const EditModel &model, int
|
||||
int posInLine = pos - posLineStart;
|
||||
if (posInLine <= ll->maxLineLength) {
|
||||
for (int subLine = 0; subLine < ll->lines; subLine++) {
|
||||
if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) {
|
||||
if ((posInLine >= ll->LineStart(subLine)) &&
|
||||
(posInLine <= ll->LineStart(subLine + 1)) &&
|
||||
(posInLine <= ll->numCharsBeforeEOL)) {
|
||||
if (start) {
|
||||
posRet = ll->LineStart(subLine) + posLineStart;
|
||||
} else {
|
||||
if (subLine == ll->lines - 1)
|
||||
posRet = ll->LineStart(subLine + 1) + posLineStart;
|
||||
posRet = ll->numCharsBeforeEOL + posLineStart;
|
||||
else
|
||||
posRet = ll->LineStart(subLine + 1) + posLineStart - 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user