diff --git a/ChangeLog b/ChangeLog index 0fcca97d..e33d4065 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2018-10-29 Markus Gans * FTerm is now a data member of FVTerm + * Fix FListBox prevListItem() 2018-10-26 Markus Gans * Building Fix for a negative value check (gcc < 4.8) diff --git a/src/flistbox.cpp b/src/flistbox.cpp index 9cca9f6d..3baa61c5 100644 --- a/src/flistbox.cpp +++ b/src/flistbox.cpp @@ -1532,10 +1532,10 @@ void FListBox::prevListItem (int distance) if ( current == 1 ) return; - current -= std::size_t(distance); - - if ( current < 1 ) + if ( current < std::size_t(distance) ) current = 1; + else + current -= std::size_t(distance); if ( current <= std::size_t(yoffset) ) { diff --git a/src/fvterm.cpp b/src/fvterm.cpp index 18db2cd1..29fb80b8 100644 --- a/src/fvterm.cpp +++ b/src/fvterm.cpp @@ -1951,7 +1951,9 @@ void FVTerm::flush_out() { while ( ! output_buffer->empty() ) { - fterm->Fputchar (output_buffer->front()); + if ( fterm ) + fterm->Fputchar(output_buffer->front()); + output_buffer->pop(); } diff --git a/src/include/final/fvterm.h b/src/include/final/fvterm.h index b1a006cf..9f9ede2a 100644 --- a/src/include/final/fvterm.h +++ b/src/include/final/fvterm.h @@ -143,9 +143,9 @@ class FVTerm // Mutators void setTermXY (int, int); - static void hideCursor (bool); - static void hideCursor(); - static void showCursor(); + void hideCursor (bool); + void hideCursor(); + void showCursor(); void setPrintCursor (const FPoint&); void setPrintCursor (int, int); void setColor (short, short);