Skip to content

Commit

Permalink
Merge pull request #36882 from Qrox/help-dir
Browse files Browse the repository at this point in the history
Fix unreplaced tag in the help UI when there's less than two bound keys for a movement action
  • Loading branch information
ZhilkinSerg authored Jan 10, 2020
2 parents 02d4781 + d1fff66 commit 4452534
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ std::string help::get_dir_grid()

for( auto dir : movearray ) {
std::vector<char> keys = keys_bound_to( dir );
for( size_t i = 0; i < keys.size(); i++ ) {
for( size_t i = 0; i < 2; i++ ) {
movement = string_replace( movement, "<" + action_ident( dir ) + string_format( "_%d>", i ),
string_format( "<color_light_blue>%s</color>", keys[i] ) );
i < keys.size() ? string_format( "<color_light_blue>%s</color>", keys[i] )
: "<color_red>?</color>" );
}
}

Expand Down

0 comments on commit 4452534

Please sign in to comment.