The data offer is destroyed after it is used. There is no need to
destroy it again.
This also fixes an issue where calling wl_data_offer_destroy with a NULL
data offer would segfault.
This change adds dmenu's mixture of Emacs+vim-style Meta keybindings.
Also 'Page_Up' and 'Page_Down' were deprecated in upstream xkbcommon,
so replace them with the new 'Prior' and 'Next' names respectively.
This change ports dmenu's token matching of space-separated input to
wmenu to match the behaviour of dmenu, with a slightly more verbose
but hopefully more readable implementation.
Determine which items go on which page ahead of time to avoid
calculating it every time. This also fixes an issue where paging from
the back doesn't give the same results as paging from the front.
Currently, unrecognized Ctrl keybindings are treated as if Ctrl wasn't
pressed. For example, Ctrl+q results in q being typed. Instead, ignore
these keypresses.
There's no need to distinguish between vertical and horizontal mode
for the directional keys. By not doing so we match dmenu's behaviour
and also reduce code duplication.
Compiling with --buildtype=release fails with message:
../main.c:935:17: error: argument 2 null where non-null expected [-Werror=nonnull]
935 | memcpy(state->text + state->cursor, s, n);
GCC only produces this error with optimizations enabled. Looking at
the build output I assume this happens because it tries to inline the
function.