| 1188 | } |
| 1189 | |
| 1190 | void clear_mapping(keyseq key) |
| 1191 | { |
| 1192 | macromap &mapref = get_map(); |
| 1193 | if (!mapref.count(key)) |
| 1194 | return; |
| 1195 | |
| 1196 | const int keycode = key[0]; |
| 1197 | string key_str = keycode_is_printable(keycode) |
| 1198 | ? keycode_to_name(keycode, false).c_str() |
| 1199 | : make_stringf("%s (%s)", |
| 1200 | vtostr(key).c_str(), keycode_to_name(keycode, false).c_str()); |
| 1201 | string action_str = vtostr(mapref[key]); |
| 1202 | |
| 1203 | action_str = replace_all(action_str, "<", "<<"); |
| 1204 | key_str = replace_all(key_str, "<", "<<"); |
| 1205 | |
| 1206 | status_msg = make_stringf("Cleared %s '%s' => '%s'.", |
| 1207 | mode_name().c_str(), |
| 1208 | key_str.c_str(), |
| 1209 | action_str.c_str()); |
| 1210 | |
| 1211 | macro_del(mapref, key); |
| 1212 | crawl_state.unsaved_macros = true; |
| 1213 | fill_entries(); |
| 1214 | } |
| 1215 | |
| 1216 | void clear_hovered() |
| 1217 | { |
nothing calls this directly
no test coverage detected