aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r--src/nvim/os_unix.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c
index 7ec4059bce..f7b47f9569 100644
--- a/src/nvim/os_unix.c
+++ b/src/nvim/os_unix.c
@@ -43,6 +43,7 @@
#include "nvim/syntax.h"
#include "nvim/tempfile.h"
#include "nvim/term.h"
+#include "nvim/ui.h"
#include "nvim/types.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"
@@ -181,22 +182,26 @@ void mch_settitle(char_u *title, char_u *icon)
* Note: if "t_ts" is set, title is set with escape sequence rather
* than x11 calls, because the x11 calls don't always work
*/
- if ((type || *T_TS != NUL) && title != NULL) {
+ if ((type || *T_TS != NUL || abstract_ui) && title != NULL) {
if (oldtitle == NULL
) /* first call but not in GUI, save title */
(void)get_x11_title(FALSE);
- if (*T_TS != NUL) /* it's OK if t_fs is empty */
+ if (abstract_ui) {
+ ui_set_title((char *)title);
+ } else if (*T_TS != NUL) /* it's OK if t_fs is empty */
term_settitle(title);
did_set_title = TRUE;
}
- if ((type || *T_CIS != NUL) && icon != NULL) {
+ if ((type || *T_CIS != NUL || abstract_ui) && icon != NULL) {
if (oldicon == NULL
) /* first call, save icon */
get_x11_icon(FALSE);
- if (*T_CIS != NUL) {
+ if (abstract_ui) {
+ ui_set_icon((char *)icon);
+ } else if (*T_CIS != NUL) {
out_str(T_CIS); /* set icon start */
out_str_nf(icon);
out_str(T_CIE); /* set icon end */
@@ -270,7 +275,7 @@ int use_xterm_mouse(void)
return 0;
}
-#if defined(USE_FNAME_CASE) || defined(PROTO)
+#if defined(USE_FNAME_CASE)
/*
* Set the case of the file name, if it already exists. This will cause the
* file name to remain exactly the same.
@@ -326,7 +331,7 @@ int len /* buffer size, only used when name gets longer */
}
#endif
-#if defined(HAVE_ACL) || defined(PROTO)
+#if defined(HAVE_ACL)
# ifdef HAVE_SYS_ACL_H
# include <sys/acl.h>
# endif
@@ -335,7 +340,7 @@ int len /* buffer size, only used when name gets longer */
# endif
-#if defined(HAVE_SELINUX) || defined(PROTO)
+#if defined(HAVE_SELINUX)
/*
* Copy security info from "from_file" to "to_file".
*/
@@ -437,7 +442,7 @@ int mch_nodetype(char_u *name)
return NODE_WRITABLE;
}
-#if defined(EXITFREE) || defined(PROTO)
+#if defined(EXITFREE)
void mch_free_mem(void)
{
free(oldtitle);