aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2002-02-20 02:15:24 +0000
committernyamatongwe <devnull@localhost>2002-02-20 02:15:24 +0000
commitf0e542aa8c84f3cbb4a405416e2c72c7ceb93c02 (patch)
tree8b7cd55ec225a75ba55c3471df2cf880afbbbece /src
parent92f21a3cf29fc84cc3420d8341873920c7324999 (diff)
downloadscintilla-mirror-f0e542aa8c84f3cbb4a405416e2c72c7ceb93c02.tar.gz
Fixed off-by-one when handling beyond end of display lines.
Diffstat (limited to 'src')
-rw-r--r--src/ContractionState.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx
index aadf98ed9..5b36b2cad 100644
--- a/src/ContractionState.cxx
+++ b/src/ContractionState.cxx
@@ -104,7 +104,7 @@ int ContractionState::DocFromDisplay(int lineDisplay) const {
if (lineDisplay <= 0)
return 0;
if (lineDisplay >= linesInDisplay)
- return linesInDoc-1;
+ return linesInDoc;
if (size == 0)
return lineDisplay;
MakeValid();