diff options
Diffstat (limited to 'tuiclient/scrollwindow.cpp')
-rw-r--r-- | tuiclient/scrollwindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tuiclient/scrollwindow.cpp b/tuiclient/scrollwindow.cpp index 3714f04..b0f7343 100644 --- a/tuiclient/scrollwindow.cpp +++ b/tuiclient/scrollwindow.cpp @@ -38,8 +38,12 @@ void Tscroll_window::compose(){ make_frame(); color_downloads(window); // screenlines[26]="Max_num:"+toString(max_received_screenline_num); - top_position=scroll_lines.size()-height+2; // +2 for border lines -// if (top_position<0) {top_position=0;}; +// top_position=; // +2 for border lines + if (scroll_lines.size()+2<height){ + top_position=0; + }else{ + top_position=scroll_lines.size()-height+2; + }; uint line_num=top_position; for (uint y=0; (y<bottom_screenline_num && line_num<scroll_lines.size()); y++, line_num++){ msg_line(y+1,scroll_lines[line_num]); |