Skip to content

Commit

Permalink
Fix extended pickup window (#36593)
Browse files Browse the repository at this point in the history
  • Loading branch information
8street authored and kevingranade committed Jan 2, 2020
1 parent efa31be commit d2e8c25
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pickup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<char>( raw_input_char ) - '0';
Expand Down

0 comments on commit d2e8c25

Please sign in to comment.