diff options
author | Colomban Wendling <ban@herbesfolles.org> | 2015-10-25 15:22:07 +0100 |
---|---|---|
committer | Colomban Wendling <ban@herbesfolles.org> | 2015-10-25 15:22:07 +0100 |
commit | 41cfa209750b4a06d213d4b9b8e72be40fe5a8f7 (patch) | |
tree | b66c59551b08faa82fccb205870b8d1731acfed2 /src | |
parent | 7c74818b84faff980e70e1e7fad9498464fb1cfa (diff) | |
download | scintilla-mirror-41cfa209750b4a06d213d4b9b8e72be40fe5a8f7.tar.gz |
Fix line end movement on display lines when EOLs are visible
Diffstat (limited to 'src')
-rw-r--r-- | src/EditView.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 1d040c81e..04b94a815 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -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; } |