Project

General

Profile

Actions

Bug #504

closed

missing redraw when scroling down

Added by Thomas Capricelli over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
libyzis
Target version:
Start date:
01/14/2009
Due date:
% Done:

100%

Estimated time:

Description

easy to reproduce :
  • open a file of more than 2 pages
  • scroll down with either page-down or control-f
  • most of the screen is not updated, moreover you can not scroll down any further

if you do control-l, then the problem is fixed, and you can can scroll down further again.


Files

scrolllinefix.diff (818 Bytes) scrolllinefix.diff Reza Jelveh, 01/16/2009 10:00 PM
scrolllinefix.diff (813 Bytes) scrolllinefix.diff Reza Jelveh, 01/16/2009 10:04 PM
Actions #1

Updated by Thomas Capricelli over 13 years ago

example of log when doing exactly what is described above :

> /tmp/yzis-orzel-J18251.log <
YSession:sendKey( true , key=<PAGEDOWN>)
YModePool:Looking mappings for <PAGEDOWN>
YModePool:Appending to input buffer <PAGEDOWN>
YModeCommand:ExecCommand( view, , inputs='<PAGEDOWN>')
NYStatusBar:refresh() Refreshing the status bar
YDrawBuffer:squeeze: firstLine=15 ; lastLine=17 ; mFirstBufferLine=0 ; size=18
YDrawBuffer: : firstLine=15 ; lastLine=17 ; mFirstBufferLine=15 ; size=3
YView:guiPaintEvent( 0 ) [(line,col)=(4,0)<==============>(line,col)=(33,164)]
/home/orzel/hg/yzis3/libyzis/drawbuffer.cpp:191 *assertion 'bl >= mScreenTopBufferLine' failed *:
YDrawBuffer:YDrawBuffer::scrollForViewCursor returning false
NYStatusBar:refresh() Refreshing the status bar
Actions #2

Updated by Reza Jelveh over 13 years ago

replacing:

310 void YView::scrollLineToTop( int line )
311 {
312 int scroll_horizontal, scroll_vertical;
313 if ( mDrawBuffer.scrollLineToTop(line, &scroll_horizontal, &scroll_vertical) ) {
314 mDrawBuffer.squeeze();
315 guiScroll(scroll_horizontal, scroll_vertical);
316 }
317 }

with:

310 void YView::scrollLineToTop( int line )
311 {
312 int scroll_horizontal, scroll_vertical;
313
314 if ( mDrawBuffer.scrollLineToTop(line, &scroll_horizontal, &scroll_vertical) ) {
315 viewCursorFromLineColumn( line+scroll_vertical+1, 0 );
316 mDrawBuffer.squeeze();
317 guiScroll(scroll_horizontal, scroll_vertical);
318 }
319 }

works as temporary workaround. but of course viewcursorfromlinecolumn is way overkill. also the cursor jumps back to the first line. so the cursor offset must be added as well.

Actions #3

Updated by Reza Jelveh over 13 years ago

using just targetbufferline seems better

though im not sure if the last targetbufferline is actually necessary...

Actions #4

Updated by Reza Jelveh over 13 years ago

sorry, this one should properly respect indenting.

Actions #5

Updated by Loïc P. over 13 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

The fact was in the case of scrolling down by doing a scrollLineAtTop : lines below were not retrieved from buffer.
I added a method YDrawBuffer::fill() which will ensure the YDrawBuffer display as much lines as possible.
Fixed by revision r4235.

Actions

Also available in: Atom PDF