diff options
author | corvid <corvid@lavabit.com> | 2009-09-26 00:33:39 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-09-26 00:33:39 +0000 |
commit | 534c03ef286a503d9f962786a890332986539526 (patch) | |
tree | e124cb8814be6d0d09b63da464489071fc4f4e47 /dw/textblock.cc | |
parent | 98f12071ee9c656bc8180e8e96b92860f354174a (diff) |
use word index in lastWordDrawn
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 1a2e9ad9..da376dce 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -42,7 +42,7 @@ Textblock::Textblock (bool limitTextWidth) ignoreLine1OffsetSometimes = false; mustQueueResize = false; redrawY = 0; - lastWordDrawn = 0; + lastWordDrawn = -1; /* * The initial sizes of lines and words should not be @@ -344,7 +344,7 @@ void Textblock::sizeAllocateImpl (core::Allocation *allocation) wordIndex++) { word = words->getRef (wordIndex); - if (wordIndex == lastWordDrawn) { + if (wordIndex == lastWordDrawn + 1) { redrawY = misc::min (redrawY, lineYOffsetWidget (line)); } @@ -428,7 +428,7 @@ void Textblock::resizeDrawImpl () /* Remember the last word that has been drawn so we can ensure to * draw any new added words (see sizeAllocateImpl()). */ - lastWordDrawn = lastLine->lastWord + 1; + lastWordDrawn = lastLine->lastWord; } redrawY = getHeight (); |