Merge #22382 has('gui_running')

This commit is contained in:
Justin M. Keyes
2023-02-28 06:24:23 -05:00
committed by GitHub
12 changed files with 110 additions and 30 deletions

View File

@@ -3228,7 +3228,9 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
}
if (!n) {
if (STRNICMP(name, "patch", 5) == 0) {
if (STRNICMP(name, "gui_running", 11) == 0) {
n = ui_gui_attached();
} else if (STRNICMP(name, "patch", 5) == 0) {
if (name[5] == '-'
&& strlen(name) >= 11
&& ascii_isdigit(name[6])