summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tuiclient/scrollwindow.cpp')
-rw-r--r--tuiclient/scrollwindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tuiclient/scrollwindow.cpp b/tuiclient/scrollwindow.cpp
index 6e7354c..cdfafad 100644
--- a/tuiclient/scrollwindow.cpp
+++ b/tuiclient/scrollwindow.cpp
@@ -31,10 +31,11 @@
void Tscroll_window::compose(){
// msg_text=msg_text+" ";
//
- make_frame();
getmaxyx(window,height,width);
- bottom_screenline_num=height-1;
- color_downloads();
+ bottom_screenline_num=height-2;
+ color_scroll_window(window);
+ 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;};
@@ -47,6 +48,7 @@ void Tscroll_window::compose(){
void Tscroll_window::add_line(string line){
+ max_received_screenline_num=scroll_lines.size();
scroll_lines.push_back(line);
if (scroll_lines.size()>SCROLL_LINES_MAX_NUM){
scroll_lines.erase(scroll_lines.begin(),scroll_lines.begin()+scroll_lines.size()-SCROLL_LINES_MAX_NUM);