diff --git a/src/pickup.cpp b/src/pickup.cpp index 288ea626d3f7b..73d76bf4df594 100644 --- a/src/pickup.cpp +++ b/src/pickup.cpp @@ -622,6 +622,7 @@ void Pickup::pick_up( const tripoint &p, int min, from_where get_items_from ) int selected = 0; int iScrollPos = 0; + std::string clear_buffer( pickupW, ' ' ); std::string filter; std::string new_filter; // Indexes of items that match the filter @@ -636,10 +637,12 @@ void Pickup::pick_up( const tripoint &p, int min, from_where get_items_from ) const std::string pickup_chars = ctxt.get_available_single_char_hotkeys( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:;" ); int idx = -1; - for( int i = 1; i < pickupH; i++ ) { - mvwprintw( w_pickup, point( 0, i ), - " " ); + + //clear all items names + for( int cur_row = 1; cur_row < pickupH; cur_row++ ) { + mvwprintw( w_pickup, point( 0, cur_row ), clear_buffer ); } + if( action == "ANY_INPUT" && raw_input_char >= '0' && raw_input_char <= '9' ) { int raw_input_char_value = static_cast( raw_input_char ) - '0';