0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.3699: the +title feature adds a lot of #ifdef but little code

Problem:    The +title feature adds a lot of #ifdef but little code.
Solution:   Graduate the +title feature.
This commit is contained in:
Bram Moolenaar
2021-11-29 20:39:38 +00:00
parent 0c359af5c0
commit 651fca85c7
34 changed files with 56 additions and 244 deletions

View File

@@ -138,7 +138,7 @@ gui_start(char_u *arg UNUSED)
// Back to old term settings
//
// FIXME: If we got here because a child process failed and flagged to
// the parent to resume, and X11 is enabled with FEAT_TITLE, this will
// the parent to resume, and X11 is enabled, this will
// hit an X11 I/O error and do a longjmp(), leaving recursive
// permanently set to 1. This is probably not as big a problem as it
// sounds, because gui_mch_init() in both gui_x11.c and gui_gtk_x11.c
@@ -146,9 +146,7 @@ gui_start(char_u *arg UNUSED)
// actually hit this case.
termcapinit(old_term);
settmode(TMODE_RAW); // restart RAW mode
#ifdef FEAT_TITLE
set_title_defaults(); // set 'title' and 'icon' again
#endif
#if defined(GUI_MAY_SPAWN) && defined(EXPERIMENTAL_GUI_CMD)
if (msg)
emsg(msg);
@@ -741,10 +739,9 @@ gui_init(void)
*/
if (gui_mch_open() != FAIL)
{
#ifdef FEAT_TITLE
maketitle();
resettitle();
#endif
init_gui_options();
#ifdef FEAT_ARABIC
// Our GUI can't do bidi.
@@ -4413,10 +4410,8 @@ gui_update_scrollbars(
}
}
#ifdef FEAT_TITLE
// update the title, it may show the scroll position
maketitle();
#endif
prev_curwin = curwin;
--hold_gui_events;
@@ -5558,9 +5553,7 @@ drop_callback(void *cookie)
# ifdef FEAT_MENU
gui_update_menus(0);
# endif
#ifdef FEAT_TITLE
maketitle();
#endif
setcursor();
out_flush_cursor(FALSE, FALSE);
}