options key parsing
OPTIONS=menu_previous_page:\mv BINDINGS=M-v:menu_previous_page both worked, but OPTIONS=menu_previous_page:M-v BINDINGS=\mv:menu_previous_page both failed. Make all four variations work. Tiny change made large by the need to move some things around. The option definition for menu_first_page had a couple of its flag bits swapped. I didn't try to figure out whether that had any impact.
This commit is contained in:
@@ -443,4 +443,23 @@ struct savefile_info {
|
||||
(nhassert_failed(#expression, __FILE__, __LINE__), 0))
|
||||
#endif
|
||||
|
||||
/* Macros for meta and ctrl modifiers:
|
||||
* M and C return the meta/ctrl code for the given character;
|
||||
* e.g., (C('c') is ctrl-c
|
||||
*/
|
||||
#ifndef M
|
||||
#ifndef NHSTDC
|
||||
#define M(c) (0x80 | (c))
|
||||
#else
|
||||
#define M(c) ((c) - 128)
|
||||
#endif /* NHSTDC */
|
||||
#endif
|
||||
|
||||
#ifndef C
|
||||
#define C(c) (0x1f & (c))
|
||||
#endif
|
||||
|
||||
#define unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c))
|
||||
#define unmeta(c) (0x7f & (c))
|
||||
|
||||
#endif /* GLOBAL_H */
|
||||
|
||||
Reference in New Issue
Block a user