[geany/geany] c21db7: Fix line end movement on display lines when EOLs are visible
Colomban Wendling
git-noreply at xxxxx
Thu Nov 12 17:04:27 UTC 2015
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Thu, 12 Nov 2015 17:04:27 UTC
Commit: c21db7d80c0ec86c5774f95616a333f7ab2f8991
https://github.com/geany/geany/commit/c21db7d80c0ec86c5774f95616a333f7ab2f8991
Log Message:
-----------
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
Modified Paths:
--------------
scintilla/src/EditView.cxx
Modified: scintilla/src/EditView.cxx
6 lines changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -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;
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list