diff options
author | 2014-01-18 12:42:53 -0800 | |
---|---|---|
committer | 2014-01-18 12:42:53 -0800 | |
commit | 808bc42f2a75e4af70ae992f6b7c1a4bf59eac50 (patch) | |
tree | cc236e47eb3a0d9028fae2f6aafbb78efbce8e59 /common.h | |
parent | 9920047b346cd2aeb1a086dbd3c2e1e9856fd2b0 (diff) |
Further work on keyboard navigating the completion list
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -88,14 +88,33 @@ enum typedef unsigned int escape_flags_t; /* Directions */ -enum cardinal_direction_t +enum selection_direction_t { + /* visual directions */ direction_north, direction_east, direction_south, - direction_west + direction_west, + + /* logical directions */ + direction_next, + direction_prev }; +inline bool selection_direction_is_cardinal(selection_direction_t dir) +{ + switch (dir) + { + case direction_north: + case direction_east: + case direction_south: + case direction_west: + return true; + default: + return false; + } +} + /** Helper macro for errors */ |