]> _ Git - termbox2.git/commit
skip empty caps (#57)
authorAdam Saponara <as@php.net>
Fri, 7 Jul 2023 00:30:14 +0000 (20:30 -0400)
committerAdam Saponara <as@php.net>
Fri, 7 Jul 2023 00:30:14 +0000 (20:30 -0400)
commit80733af0b93cfa75bf2af56c391ee1a2717cbd1e
tree252347b20eb8ec6f4dc1b9df7c7136719334c81c
parent1e0092b50ee96f5993f456e8ecdb06044a38b8eb
skip empty caps (#57)

this slipped under the radar because none of the built-in terms have
more than one empty key cap, or an empty string for one of the caps
we use in init/shutdown.

some terms do of course have multiple empty caps. for example,
`xterm-color` is missing `khome`, `kend`, and `kcbt` (back-tab),
which leads to adding `""` more than once, which leads to a
`TB_ERR_CAP_COLLISION` error on init. other terms don't have caps for
hiding and showing the cursor, for example.

to avoid these errors, we avoid adding empty caps to the trie, and
similarly avoid emitting empty caps.

it's kind of hard to add a functional test for this as it gets into
testing multiple term envs and terminal emulators which is a bit of a
pandora's box. as an alternative, i'm going to do some more manual
testing on various terms on my system.
termbox2.h