Bug #504
closedmissing redraw when scroling down
100%
Description
- 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
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
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.
Updated by Reza Jelveh over 13 years ago
- File scrolllinefix.diff scrolllinefix.diff added
using just targetbufferline seems better
though im not sure if the last targetbufferline is actually necessary...
Updated by Reza Jelveh over 13 years ago
- File scrolllinefix.diff scrolllinefix.diff added
sorry, this one should properly respect indenting.
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.