mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
tui: move terminfo_is_term_family()
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -61,20 +61,6 @@
|
|||||||
#define UNIBI_SET_NUM_VAR(var, num) (var).i = (num);
|
#define UNIBI_SET_NUM_VAR(var, num) (var).i = (num);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Per the commentary in terminfo, only a minus sign is a true suffix
|
|
||||||
// separator.
|
|
||||||
bool terminfo_is_term_family(const char *term, const char *family)
|
|
||||||
{
|
|
||||||
if (!term) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
size_t tlen = strlen(term);
|
|
||||||
size_t flen = strlen(family);
|
|
||||||
return tlen >= flen
|
|
||||||
&& 0 == memcmp(term, family, flen) \
|
|
||||||
&& ('\0' == term[flen] || '-' == term[flen]);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int top, bot, left, right;
|
int top, bot, left, right;
|
||||||
} Rect;
|
} Rect;
|
||||||
|
Reference in New Issue
Block a user