diff options
author | fvogel <fvogelnew1@free.fr> | 2014-12-03 06:50:06 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2014-12-03 06:50:06 (GMT) |
commit | 183f3294631b9c5d5f920e3ec574407d7f26f860 (patch) | |
tree | 8b364c2fe3b197c08e4b4652bb0778b082054999 /generic | |
parent | a05ecd7e763d2feefd2674474f689a1eda2f706f (diff) | |
parent | 5e705974729f8503207eed53228f3be313ef8da5 (diff) | |
download | tk-183f3294631b9c5d5f920e3ec574407d7f26f860.zip tk-183f3294631b9c5d5f920e3ec574407d7f26f860.tar.gz tk-183f3294631b9c5d5f920e3ec574407d7f26f860.tar.bz2 |
Merged from branch bug-7703f947aa
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTextDisp.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index e6991da..c3ea9e0 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -6446,8 +6446,6 @@ FindDLine( < TkBTreeLinesTo(NULL, dlPtr->index.linePtr)) { /* * The first display line is already past the desired line. - * FV: Some concern here as to whether we should rather return - * NULL here. */ return dlPtr; @@ -6456,7 +6454,7 @@ FindDLine( /* * The display line containing the desired index is such that the index * of the first character of this display line is at or before the - * desired index, and the index onf the first character of the next + * desired index, and the index of the first character of the next * display line is after the desired index. */ @@ -6464,24 +6462,24 @@ FindDLine( dlPtrPrev = dlPtr; dlPtr = dlPtr->nextPtr; if (dlPtr == NULL) { - /* - * We're past the last display line, either because the desired - * index lies past the visible text, or because the desired index - * is on the last display line showing the last logical line. - */ - indexPtr2 = dlPtrPrev->index; - TkTextFindDisplayLineEnd(textPtr, &indexPtr2, 1, NULL); - if (TkTextIndexCmp(&indexPtr2,indexPtr) >= 0) { - dlPtr = dlPtrPrev; - break; - } else { - return NULL; - } - } + /* + * We're past the last display line, either because the desired + * index lies past the visible text, or because the desired index + * is on the last display line showing the last logical line. + */ + indexPtr2 = dlPtrPrev->index; + TkTextFindDisplayLineEnd(textPtr, &indexPtr2, 1, NULL); + if (TkTextIndexCmp(&indexPtr2,indexPtr) >= 0) { + dlPtr = dlPtrPrev; + break; + } else { + return NULL; + } + } if (TkTextIndexCmp(&dlPtr->index,indexPtr) > 0) { dlPtr = dlPtrPrev; break; - } + } } return dlPtr; |