Patch 8.2.3699

5 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 29, 2021, 3:40:30 PM11/29/21
to vim...@googlegroups.com

Patch 8.2.3699
Problem: The +title feature adds a lot of #ifdef but little code.
Solution: Graduate the +title feature.
Files: src/feature.h, src/alloc.c, src/arglist.c, src/autocmd.c,
src/buffer.c, src/bufwrite.c, src/change.c, src/drawscreen.c,
src/evalfunc.c, src/ex_cmds.c, src/ex_docmd.c, src/gui.c,
src/gui_gtk_x11.c, src/if_xcmdsrv.c, src/locale.c, src/main.c,
src/misc2.c, src/netbeans.c, src/option.c, src/optionstr.c,
src/os_amiga.c, src/os_mswin.c, src/os_unix.c, src/os_win32.c,
src/regexp.c, src/term.c, src/ui.c, src/version.c, src/window.c,
src/globals.h, src/option.h, src/optiondefs.h,
runtime/doc/options.txt, runtime/doc/various.txt


*** ../vim-8.2.3698/src/feature.h 2021-06-20 13:01:25.984924607 +0100
--- src/feature.h 2021-11-29 20:15:30.157182000 +0000
***************
*** 109,114 ****
--- 109,115 ----
* +insert_expand CTRL-N/CTRL-P/CTRL-X in insert mode.
* +modify_fname modifiers for file name. E.g., "%:p:h".
* +comments 'comments' option.
+ * +title 'title' and 'icon' options
*
* Obsolete:
* +tag_old_static Old style static tags: "file:tag file ..".
***************
*** 360,376 ****
#endif

/*
- * +title 'title' and 'icon' options
* +statusline 'statusline', 'rulerformat' and special format of
* 'titlestring' and 'iconstring' options.
- * +byte_offset '%o' in 'statusline' and builtin functions line2byte()
- * and byte2line().
- * Note: Required for Macintosh.
*/
- #if defined(FEAT_NORMAL)
- # define FEAT_TITLE
- #endif
-
#ifdef FEAT_NORMAL
# define FEAT_STL_OPT
# ifndef FEAT_CMDL_INFO
--- 361,369 ----
***************
*** 378,383 ****
--- 371,381 ----
# endif
#endif

+ /*
+ * +byte_offset '%o' in 'statusline' and builtin functions line2byte()
+ * and byte2line().
+ * Note: Required for Macintosh.
+ */
#ifdef FEAT_NORMAL
# define FEAT_BYTEOFF
#endif
*** ../vim-8.2.3698/src/alloc.c 2021-11-19 11:27:49.099056921 +0000
--- src/alloc.c 2021-11-29 20:15:44.709142150 +0000
***************
*** 421,429 ****
# endif
}

- # ifdef FEAT_TITLE
free_titles();
- # endif
# if defined(FEAT_SEARCHPATH)
free_findfile();
# endif
--- 421,427 ----
*** ../vim-8.2.3698/src/arglist.c 2021-08-02 18:10:30.957721094 +0100
--- src/arglist.c 2021-11-29 20:15:59.633101364 +0000
***************
*** 770,778 ****

if (do_arglist(eap->arg, AL_ADD, i, TRUE) == FAIL)
return;
- #ifdef FEAT_TITLE
maketitle();
- #endif

if (curwin->w_arg_idx == 0
&& (curbuf->b_ml.ml_flags & ML_EMPTY)
--- 770,776 ----
***************
*** 792,800 ****
do_arglist(eap->arg, AL_ADD,
eap->addr_count > 0 ? (int)eap->line2 : curwin->w_arg_idx + 1,
FALSE);
- #ifdef FEAT_TITLE
maketitle();
- #endif
}

/*
--- 790,796 ----
***************
*** 853,861 ****
}
else
do_arglist(eap->arg, AL_DEL, 0, FALSE);
- #ifdef FEAT_TITLE
maketitle();
- #endif
}

/*
--- 849,855 ----
*** ../vim-8.2.3698/src/autocmd.c 2021-11-20 10:38:17.705011550 +0000
--- src/autocmd.c 2021-11-29 20:16:18.461050018 +0000
***************
*** 2253,2262 ****
|| event == EVENT_VIMLEAVE
|| event == EVENT_VIMLEAVEPRE))
{
- #ifdef FEAT_TITLE
if (curbuf->b_changed != save_changed)
need_maketitle = TRUE;
- #endif
curbuf->b_changed = save_changed;
}

--- 2253,2260 ----
*** ../vim-8.2.3698/src/buffer.c 2021-11-24 16:32:50.720422469 +0000
--- src/buffer.c 2021-11-29 20:16:41.612987063 +0000
***************
*** 44,52 ****
#else
static int otherfile_buf(buf_T *buf, char_u *ffname);
#endif
- #ifdef FEAT_TITLE
static int value_changed(char_u *str, char_u **last);
- #endif
static int append_arg_number(win_T *wp, char_u *buf, int buflen, int add_file);
static void free_buffer(buf_T *);
static void free_buffer_stuff(buf_T *buf, int free_options);
--- 44,50 ----
***************
*** 1856,1864 ****
buflist_getfpos();

check_arg_idx(curwin); // check for valid arg_idx
- #ifdef FEAT_TITLE
maketitle();
- #endif
// when autocmds didn't change it
if (curwin->w_topline == 1 && !curwin->w_topline_was_set)
scroll_cursor_halfway(FALSE); // redisplay at correct position
--- 1854,1860 ----
***************
*** 3461,3469 ****

if (curwin->w_buffer == buf)
check_arg_idx(curwin); // check file name for arg list
- #ifdef FEAT_TITLE
maketitle(); // set window title
- #endif
status_redraw_all(); // status lines need to be redrawn
fmarks_check_names(buf); // check named file marks
ml_timestamp(buf); // reset timestamp
--- 3457,3463 ----
***************
*** 3780,3786 ****
vim_snprintf((char *)buf, buflen, "%d-%d", col, vcol);
}

- #if defined(FEAT_TITLE) || defined(PROTO)
static char_u *lasttitle = NULL;
static char_u *lasticon = NULL;

--- 3774,3779 ----
***************
*** 4045,4051 ****
}
# endif

- #endif // FEAT_TITLE

#if defined(FEAT_STL_OPT) || defined(FEAT_GUI_TABLINE) || defined(PROTO)

--- 4038,4043 ----
*** ../vim-8.2.3698/src/bufwrite.c 2021-10-16 11:58:51.409123004 +0100
--- src/bufwrite.c 2021-11-29 20:16:54.164953006 +0000
***************
*** 1630,1638 ****
if (forceit && overwriting && vim_strchr(p_cpo, CPO_KEEPRO) == NULL)
{
buf->b_p_ro = FALSE;
- #ifdef FEAT_TITLE
need_maketitle = TRUE; // set window title later
- #endif
status_redraw_all(); // redraw status lines later
}

--- 1630,1636 ----
*** ../vim-8.2.3698/src/change.c 2021-09-11 14:06:40.484475113 +0100
--- src/change.c 2021-11-29 20:17:06.604919307 +0000
***************
*** 146,154 ****
ml_setflags(curbuf);
check_status(curbuf);
redraw_tabline = TRUE;
- #ifdef FEAT_TITLE
need_maketitle = TRUE; // set window title later
- #endif
}

#ifdef FEAT_EVAL
--- 146,152 ----
***************
*** 892,900 ****
save_file_ff(buf);
check_status(buf);
redraw_tabline = TRUE;
- #ifdef FEAT_TITLE
need_maketitle = TRUE; // set window title later
- #endif
++CHANGEDTICK(buf);
}
else if (always_inc_changedtick)
--- 890,896 ----
*** ../vim-8.2.3698/src/drawscreen.c 2021-10-18 20:56:32.113548150 +0100
--- src/drawscreen.c 2021-11-29 20:17:25.428868400 +0000
***************
*** 610,624 ****
win_redr_ruler(curwin, always, FALSE);
#endif

- #ifdef FEAT_TITLE
if (need_maketitle
! # ifdef FEAT_STL_OPT
|| (p_icon && (stl_syntax & STL_IN_ICON))
|| (p_title && (stl_syntax & STL_IN_TITLE))
! # endif
)
maketitle();
! #endif
// Redraw the tab pages line if needed.
if (redraw_tabline)
draw_tabline();
--- 610,623 ----
win_redr_ruler(curwin, always, FALSE);
#endif

if (need_maketitle
! #ifdef FEAT_STL_OPT
|| (p_icon && (stl_syntax & STL_IN_ICON))
|| (p_title && (stl_syntax & STL_IN_TITLE))
! #endif
)
maketitle();
!
// Redraw the tab pages line if needed.
if (redraw_tabline)
draw_tabline();
*** ../vim-8.2.3698/src/evalfunc.c 2021-11-03 21:56:41.218795250 +0000
--- src/evalfunc.c 2021-11-29 20:17:51.652797663 +0000
***************
*** 5787,5799 ****
0
#endif
},
! {"title",
! #ifdef FEAT_TITLE
! 1
! #else
! 0
! #endif
! },
{"toolbar",
#ifdef FEAT_TOOLBAR
1
--- 5787,5793 ----
0
#endif
},
! {"title", 1},
{"toolbar",
#ifdef FEAT_TOOLBAR
1
*** ../vim-8.2.3698/src/ex_cmds.c 2021-10-20 21:58:37.235792695 +0100
--- src/ex_cmds.c 2021-11-29 20:18:17.832727221 +0000
***************
*** 3082,3090 ****
// Even when cursor didn't move we need to recompute topline.
changed_line_abv_curs();

- #ifdef FEAT_TITLE
maketitle();
- #endif
#if defined(FEAT_PROP_POPUP) && defined(FEAT_QUICKFIX)
if (WIN_IS_POPUP(curwin) && curwin->w_p_pvw && retval != FAIL)
popup_set_title(curwin);
--- 3082,3088 ----
*** ../vim-8.2.3698/src/ex_docmd.c 2021-11-29 12:12:38.175653429 +0000
--- src/ex_docmd.c 2021-11-29 20:18:32.528687782 +0000
***************
*** 6205,6218 ****
out_flush();
stoptermcap();
out_flush(); // needed for SUN to restore xterm buffer
- #ifdef FEAT_TITLE
mch_restore_title(SAVE_RESTORE_BOTH); // restore window titles
- #endif
ui_suspend(); // call machine specific function
- #ifdef FEAT_TITLE
maketitle();
resettitle(); // force updating the title
- #endif
starttermcap();
scroll_start(); // scroll screen before redrawing
redraw_later_clear();
--- 6205,6214 ----
***************
*** 7047,7060 ****
{
if (eap->do_ecmd_cmd != NULL)
do_cmd_argument(eap->do_ecmd_cmd);
- #ifdef FEAT_TITLE
n = curwin->w_arg_idx_invalid;
- #endif
check_arg_idx(curwin);
- #ifdef FEAT_TITLE
if (n != curwin->w_arg_idx_invalid)
maketitle();
- #endif
}

/*
--- 7043,7052 ----
***************
*** 8178,8187 ****
validate_cursor();
update_topline();
update_screen(eap->forceit ? CLEAR : VIsual_active ? INVERTED : 0);
- #ifdef FEAT_TITLE
if (need_maketitle)
maketitle();
- #endif
#if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
# ifdef VIMDLL
if (!gui.in_use)
--- 8170,8177 ----
*** ../vim-8.2.3698/src/gui.c 2021-11-28 21:33:32.307336723 +0000
--- src/gui.c 2021-11-29 20:19:13.684577606 +0000
***************
*** 138,144 ****
// 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
// 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
--- 138,144 ----
// 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, 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,154 ****
// 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);
--- 146,152 ----
***************
*** 741,750 ****
*/
if (gui_mch_open() != FAIL)
{
- #ifdef FEAT_TITLE
maketitle();
resettitle();
! #endif
init_gui_options();
#ifdef FEAT_ARABIC
// Our GUI can't do bidi.
--- 739,747 ----
*/
if (gui_mch_open() != FAIL)
{
maketitle();
resettitle();
!
init_gui_options();
#ifdef FEAT_ARABIC
// Our GUI can't do bidi.
***************
*** 4413,4422 ****
}
}

- #ifdef FEAT_TITLE
// update the title, it may show the scroll position
maketitle();
- #endif

prev_curwin = curwin;
--hold_gui_events;
--- 4410,4417 ----
***************
*** 5558,5566 ****
# ifdef FEAT_MENU
gui_update_menus(0);
# endif
- #ifdef FEAT_TITLE
maketitle();
- #endif
setcursor();
out_flush_cursor(FALSE, FALSE);
}
--- 5553,5559 ----
*** ../vim-8.2.3698/src/gui_gtk_x11.c 2021-11-23 12:27:44.564837448 +0000
--- src/gui_gtk_x11.c 2021-11-29 20:19:26.784542633 +0000
***************
*** 4540,4546 ****
gui_mch_update();
}

- #if defined(FEAT_TITLE) || defined(PROTO)
void
gui_mch_settitle(char_u *title, char_u *icon UNUSED)
{
--- 4540,4545 ----
***************
*** 4552,4558 ****
if (output_conv.vc_type != CONV_NONE)
vim_free(title);
}
- #endif // FEAT_TITLE

#if defined(FEAT_MENU) || defined(PROTO)
void
--- 4551,4556 ----
*** ../vim-8.2.3698/src/if_xcmdsrv.c 2019-12-04 20:23:44.000000000 +0000
--- src/if_xcmdsrv.c 2021-11-29 20:19:51.840475837 +0000
***************
*** 314,322 ****
set_vim_var_string(VV_SEND_SERVER, name, -1);
#endif
serverName = vim_strsave(name);
- #ifdef FEAT_TITLE
need_maketitle = TRUE;
- #endif
return 0;
}
return -2;
--- 314,320 ----
*** ../vim-8.2.3698/src/locale.c 2020-07-22 18:10:59.877072059 +0100
--- src/locale.c 2021-11-29 20:20:07.532434074 +0000
***************
*** 390,398 ****
// Set v:lang, v:lc_time, v:collate and v:ctype to the final result.
set_lang_var();
# endif
- # ifdef FEAT_TITLE
maketitle();
- # endif
}
}
}
--- 390,396 ----
*** ../vim-8.2.3698/src/main.c 2021-11-21 12:27:09.950898895 +0000
--- src/main.c 2021-11-29 20:20:28.168379232 +0000
***************
*** 668,674 ****
scroll_region_reset(); // In case Rows changed
scroll_start(); // may scroll the screen to the right position

! #if defined(FEAT_TITLE) && (defined(UNIX) || defined(VMS) || defined(MACOS_X))
term_push_title(SAVE_RESTORE_BOTH);
#endif

--- 668,674 ----
scroll_region_reset(); // In case Rows changed
scroll_start(); // may scroll the screen to the right position

! #if defined(UNIX) || defined(VMS) || defined(MACOS_X)
term_push_title(SAVE_RESTORE_BOTH);
#endif

***************
*** 1395,1404 ****
else if (redraw_cmdline || clear_cmdline)
showmode();
redraw_statuslines();
- #ifdef FEAT_TITLE
if (need_maketitle)
maketitle();
- #endif
#ifdef FEAT_VIMINFO
curbuf->b_last_used = vim_time();
#endif
--- 1395,1402 ----
*** ../vim-8.2.3698/src/misc2.c 2021-10-05 19:19:31.963894252 +0100
--- src/misc2.c 2021-11-29 20:20:43.680338068 +0000
***************
*** 1735,1743 ****
// This may cause the buffer to become (un)modified.
check_status(curbuf);
redraw_tabline = TRUE;
- #ifdef FEAT_TITLE
need_maketitle = TRUE; // set window title later
- #endif
}

/*
--- 1735,1741 ----
*** ../vim-8.2.3698/src/netbeans.c 2021-11-18 18:52:08.828648753 +0000
--- src/netbeans.c 2021-11-29 20:20:51.672316904 +0000
***************
*** 1669,1677 ****
buf->bufp = curbuf;
buf->initDone = TRUE;
do_update = 1;
- #if defined(FEAT_TITLE)
maketitle();
- #endif
#if defined(FEAT_MENU) && defined(FEAT_GUI)
if (gui.in_use)
gui_update_menus(0);
--- 1669,1675 ----
***************
*** 1748,1756 ****
{
check_status(buf->bufp);
redraw_tabline = TRUE;
- #ifdef FEAT_TITLE
maketitle();
- #endif
update_screen(0);
}
// =====================================================================
--- 1746,1752 ----
*** ../vim-8.2.3698/src/option.c 2021-11-24 16:32:50.720422469 +0000
--- src/option.c 2021-11-29 20:21:46.140542790 +0000
***************
*** 1102,1110 ****
set_fileformat(default_fileformat(), OPT_LOCAL);
}

- #ifdef FEAT_TITLE
set_title_defaults();
- #endif
}

#if defined(FEAT_MULTI_LANG) || defined(PROTO)
--- 1102,1108 ----
***************
*** 1148,1154 ****
}
#endif

- #ifdef FEAT_TITLE
/*
* 'title' and 'icon' only default to true if they have not been set or reset
* in .vimrc and we can read the old value.
--- 1146,1151 ----
***************
*** 1192,1198 ****
p_icon = val;
}
}
- #endif

void
ex_set(exarg_T *eap)
--- 1189,1194 ----
***************
*** 2272,2278 ****
return *arg;
}

- #ifdef FEAT_TITLE
/*
* When changing 'title', 'titlestring', 'icon' or 'iconstring', call
* maketitle() to create and display it.
--- 2268,2273 ----
***************
*** 2289,2295 ****
)
maketitle();
}
- #endif

/*
* set_options_bin - called when 'bin' changes value.
--- 2284,2289 ----
***************
*** 2558,2564 ****
}
#endif

- #if defined(FEAT_TITLE) || defined(PROTO)
/*
* Redraw the window title and/or tab page text later.
*/
--- 2552,2557 ----
***************
*** 2567,2573 ****
need_maketitle = TRUE;
redraw_tabline = TRUE;
}
- #endif

/*
* Return TRUE if "val" is a valid name: only consists of alphanumeric ASCII
--- 2560,2565 ----
***************
*** 2809,2817 ****
if (curbuf->b_p_ro)
curbuf->b_did_warn = FALSE;

- #ifdef FEAT_TITLE
redraw_titles();
- #endif
}

#ifdef FEAT_GUI
--- 2801,2807 ----
***************
*** 2834,2844 ****
return N_("E946: Cannot make a terminal with running job modifiable");
}
# endif
- # ifdef FEAT_TITLE
redraw_titles();
- # endif
}
- #ifdef FEAT_TITLE
// when 'endofline' is changed, redraw the window title
else if ((int *)varp == &curbuf->b_p_eol)
{
--- 2824,2831 ----
***************
*** 2854,2868 ****
{
redraw_titles();
}
- #endif

// when 'bin' is set also set some other options
else if ((int *)varp == &curbuf->b_p_bin)
{
set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
- #ifdef FEAT_TITLE
redraw_titles();
- #endif
}

// when 'buflisted' changes, trigger autocommands
--- 2841,2852 ----
***************
*** 2996,3016 ****
}
#endif

- #ifdef FEAT_TITLE
// when 'title' changed, may need to change the title; same for 'icon'
else if ((int *)varp == &p_title || (int *)varp == &p_icon)
{
did_set_title();
}
- #endif

else if ((int *)varp == &curbuf->b_changed)
{
if (!value)
save_file_ff(curbuf); // Buffer is unchanged
- #ifdef FEAT_TITLE
redraw_titles();
- #endif
modified_was_set = value;
}

--- 2980,2996 ----
***************
*** 3566,3572 ****
p_imsearch = curbuf->b_p_imsearch;
}

- #ifdef FEAT_TITLE
// if 'titlelen' has changed, redraw the title
else if (pp == &p_titlelen)
{
--- 3546,3551 ----
***************
*** 3578,3584 ****
if (starting != NO_SCREEN && old_value != p_titlelen)
need_maketitle = TRUE;
}
- #endif

// if p_ch changed value, change the command line height
else if (pp == &p_ch)
--- 3557,3562 ----
***************
*** 4971,4979 ****
* screen will be cleared later, so this is OK.
*/
mch_setmouse(FALSE); // switch mouse off
- #ifdef FEAT_TITLE
mch_restore_title(SAVE_RESTORE_BOTH); // restore window titles
- #endif
#if defined(FEAT_XCLIPBOARD) && defined(FEAT_GUI)
// When starting the GUI close the display opened for the clipboard.
// After restoring the title, because that will need the display.
--- 4949,4955 ----
*** ../vim-8.2.3698/src/optionstr.c 2021-11-24 16:32:50.720422469 +0000
--- src/optionstr.c 2021-11-29 20:22:12.800687464 +0000
***************
*** 979,988 ****
errmsg = e_invarg;
else
{
- #ifdef FEAT_TITLE
// May show a "+" in the title now.
redraw_titles();
- #endif
// Add 'fileencoding' to the swap file.
ml_setflags(curbuf);
}
--- 979,986 ----
***************
*** 999,1007 ****
if (varp == &p_enc)
{
errmsg = mb_init();
- #ifdef FEAT_TITLE
redraw_titles();
- #endif
}
}

--- 997,1003 ----
***************
*** 1141,1149 ****
curbuf->b_p_tx = TRUE;
else
curbuf->b_p_tx = FALSE;
- #ifdef FEAT_TITLE
redraw_titles();
- #endif
// update flag in swap file
ml_setflags(curbuf);
// Redraw needed when switching to/from "mac": a CR in the text
--- 1137,1143 ----
***************
*** 1603,1613 ****
fill_breakat_flags();
#endif

- #ifdef FEAT_TITLE
// 'titlestring' and 'iconstring'
else if (varp == &p_titlestring || varp == &p_iconstring)
{
! # ifdef FEAT_STL_OPT
int flagval = (varp == &p_titlestring) ? STL_IN_TITLE : STL_IN_ICON;

// NULL => statusline syntax
--- 1597,1606 ----
fill_breakat_flags();
#endif

// 'titlestring' and 'iconstring'
else if (varp == &p_titlestring || varp == &p_iconstring)
{
! #ifdef FEAT_STL_OPT
int flagval = (varp == &p_titlestring) ? STL_IN_TITLE : STL_IN_ICON;

// NULL => statusline syntax
***************
*** 1615,1624 ****
stl_syntax |= flagval;
else
stl_syntax &= ~flagval;
! # endif
did_set_title();
}
- #endif

#ifdef FEAT_GUI
// 'guioptions'
--- 1608,1616 ----
stl_syntax |= flagval;
else
stl_syntax &= ~flagval;
! #endif
did_set_title();
}

#ifdef FEAT_GUI
// 'guioptions'
***************
*** 1805,1813 ****
redraw_later(VALID);
}
curbuf->b_help = (curbuf->b_p_bt[0] == 'h');
- #ifdef FEAT_TITLE
redraw_titles();
- #endif
}
}

--- 1797,1803 ----
*** ../vim-8.2.3698/src/os_amiga.c 2021-06-24 20:43:27.754994402 +0100
--- src/os_amiga.c 2021-11-29 20:22:32.536788472 +0000
***************
*** 623,629 ****
return fib;
}

- #ifdef FEAT_TITLE
/*
* set the title of our window
* icon name is not set
--- 623,628 ----
***************
*** 660,666 ****
{
return FALSE;
}
- #endif

void
mch_setmouse(int on UNUSED)
--- 659,664 ----
***************
*** 940,948 ****
out_flush();
}

- #ifdef FEAT_TITLE
mch_restore_title(SAVE_RESTORE_BOTH); // restore window title
- #endif

ml_close_all(TRUE); // remove all memfiles

--- 938,944 ----
***************
*** 1442,1450 ****
cur_tmode = TMODE_UNKNOWN;
settmode(TMODE_RAW); // set to raw mode
}
- #ifdef FEAT_TITLE
resettitle();
- #endif
if (term_console)
win_resize_on(); // window resize events activated
return retval;
--- 1438,1444 ----
*** ../vim-8.2.3698/src/os_mswin.c 2020-12-11 19:10:46.553894148 +0000
--- src/os_mswin.c 2021-11-29 20:23:32.933067214 +0000
***************
*** 32,38 ****
#endif

#ifndef PROTO
! # if defined(FEAT_TITLE) && !defined(FEAT_GUI_MSWIN)
# include <shellapi.h>
# endif

--- 32,38 ----
#endif

#ifndef PROTO
! # if !defined(FEAT_GUI_MSWIN)
# include <shellapi.h>
# endif

***************
*** 265,271 ****
#endif
}

- #ifdef FEAT_TITLE
/*
* mch_settitle(): set titlebar of our window
*/
--- 265,270 ----
***************
*** 274,289 ****
char_u *title,
char_u *icon UNUSED)
{
! # ifdef FEAT_GUI_MSWIN
! # ifdef VIMDLL
if (gui.in_use)
! # endif
{
gui_mch_settitle(title, icon);
return;
}
! # endif
! # if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
if (title != NULL)
{
WCHAR *wp = enc_to_utf16(title, NULL);
--- 273,288 ----
char_u *title,
char_u *icon UNUSED)
{
! #ifdef FEAT_GUI_MSWIN
! # ifdef VIMDLL
if (gui.in_use)
! # endif
{
gui_mch_settitle(title, icon);
return;
}
! #endif
! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
if (title != NULL)
{
WCHAR *wp = enc_to_utf16(title, NULL);
***************
*** 295,301 ****
vim_free(wp);
return;
}
! # endif
}


--- 294,300 ----
vim_free(wp);
return;
}
! #endif
}


***************
*** 309,320 ****
void
mch_restore_title(int which UNUSED)
{
! # if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
! # ifdef VIMDLL
if (!gui.in_use)
- # endif
- SetConsoleTitle(g_szOrigTitle);
# endif
}


--- 308,319 ----
void
mch_restore_title(int which UNUSED)
{
! #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
! # ifdef VIMDLL
if (!gui.in_use)
# endif
+ SetConsoleTitle(g_szOrigTitle);
+ #endif
}


***************
*** 336,342 ****
{
return FALSE;
}
- #endif // FEAT_TITLE


/*
--- 335,340 ----
***************
*** 937,945 ****
#endif //_DEBUG

#if !defined(FEAT_GUI) || defined(VIMDLL) || defined(PROTO)
- # ifdef FEAT_TITLE
extern HWND g_hWnd; // This is in os_win32.c.
- # endif

/*
* Showing the printer dialog is tricky since we have no GUI
--- 935,941 ----
***************
*** 953,966 ****
if (s_hwnd != 0)
return;

- # ifdef FEAT_TITLE
// Window handle may have been found by init code (Windows NT only)
if (g_hWnd != 0)
{
s_hwnd = g_hWnd;
return;
}
- # endif

s_hwnd = GetConsoleWindow();
}
--- 949,960 ----
***************
*** 2301,2309 ****
{
// Remember the name
serverName = ok_name;
- # ifdef FEAT_TITLE
need_maketitle = TRUE; // update Vim window title later
- # endif

// Update the message window title
SetWindowText(message_window, (LPCSTR)ok_name);
--- 2295,2301 ----
*** ../vim-8.2.3698/src/os_unix.c 2021-11-19 12:37:31.991899942 +0000
--- src/os_unix.c 2021-11-29 20:24:48.561358195 +0000
***************
*** 118,132 ****
static void xterm_update(void);
# endif

- # if defined(FEAT_XCLIPBOARD) || defined(FEAT_TITLE)
Window x11_window = 0;
- # endif
Display *x11_display = NULL;
#endif

static int ignore_sigtstp = FALSE;

- #ifdef FEAT_TITLE
static int get_x11_title(int);

static char_u *oldtitle = NULL;
--- 118,129 ----
***************
*** 134,140 ****
static int unix_did_set_title = FALSE;
static char_u *oldicon = NULL;
static int did_set_icon = FALSE;
- #endif

static void may_core_dump(void);

--- 131,136 ----
***************
*** 170,177 ****
#if defined(SIGPWR)
static RETSIGTYPE catch_sigpwr SIGPROTOARG;
#endif
! #if defined(SIGALRM) && defined(FEAT_X11) \
! && defined(FEAT_TITLE) && !defined(FEAT_GUI_GTK)
# define SET_SIG_ALARM
static RETSIGTYPE sig_alarm SIGPROTOARG;
// volatile because it is used in signal handler sig_alarm().
--- 166,172 ----
#if defined(SIGPWR)
static RETSIGTYPE catch_sigpwr SIGPROTOARG;
#endif
! #if defined(SIGALRM) && defined(FEAT_X11) && !defined(FEAT_GUI_GTK)
# define SET_SIG_ALARM
static RETSIGTYPE sig_alarm SIGPROTOARG;
// volatile because it is used in signal handler sig_alarm().
***************
*** 1152,1162 ****
static void
after_sigcont(void)
{
- # ifdef FEAT_TITLE
// Don't change "oldtitle" in a signal handler, set a flag to obtain it
// again later.
oldtitle_outdated = TRUE;
! # endif
settmode(TMODE_RAW);
need_check_timestamps = TRUE;
did_check_timestamps = FALSE;
--- 1147,1156 ----
static void
after_sigcont(void)
{
// Don't change "oldtitle" in a signal handler, set a flag to obtain it
// again later.
oldtitle_outdated = TRUE;
!
settmode(TMODE_RAW);
need_check_timestamps = TRUE;
did_check_timestamps = FALSE;
***************
*** 1579,1586 ****

#ifdef FEAT_X11

! # if defined(ELAPSED_TIMEVAL) \
! && (defined(FEAT_XCLIPBOARD) || defined(FEAT_TITLE))

/*
* Give a message about the elapsed time for opening the X window.
--- 1573,1579 ----

#ifdef FEAT_X11

! # if defined(ELAPSED_TIMEVAL)

/*
* Give a message about the elapsed time for opening the X window.
***************
*** 1593,1599 ****
# endif
#endif

! #if defined(FEAT_X11) && (defined(FEAT_TITLE) || defined(FEAT_XCLIPBOARD))
/*
* A few functions shared by X11 title and clipboard code.
*/
--- 1586,1592 ----
# endif
#endif

! #if defined(FEAT_X11)
/*
* A few functions shared by X11 title and clipboard code.
*/
***************
*** 1776,1782 ****
}
#endif

- #ifdef FEAT_TITLE

#ifdef FEAT_X11

--- 1769,1774 ----
***************
*** 2316,2322 ****
}
}

- #endif // FEAT_TITLE

/*
* Return TRUE if "name" looks like some xterm name.
--- 2308,2313 ----
***************
*** 3349,3358 ****
# if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
VIM_CLEAR(signal_stack);
# endif
- # ifdef FEAT_TITLE
vim_free(oldtitle);
vim_free(oldicon);
- # endif
}
#endif

--- 3340,3347 ----
***************
*** 3403,3416 ****
#endif
{
settmode(TMODE_COOK);
- #ifdef FEAT_TITLE
if (!is_not_a_term())
{
// restore xterm title and icon name
mch_restore_title(SAVE_RESTORE_BOTH);
term_pop_title(SAVE_RESTORE_BOTH);
}
! #endif
/*
* When t_ti is not empty but it doesn't cause swapping terminal
* pages, need to output a newline when msg_didout is set. But when
--- 3392,3404 ----
#endif
{
settmode(TMODE_COOK);
if (!is_not_a_term())
{
// restore xterm title and icon name
mch_restore_title(SAVE_RESTORE_BOTH);
term_pop_title(SAVE_RESTORE_BOTH);
}
!
/*
* When t_ti is not empty but it doesn't cause swapping terminal
* pages, need to output a newline when msg_didout is set. But when
***************
*** 4600,4608 ****
cur_tmode = TMODE_UNKNOWN;
settmode(TMODE_RAW); // set to raw mode
}
- # ifdef FEAT_TITLE
resettitle();
- # endif
# if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
restore_clipboard();
# endif
--- 4588,4594 ----
***************
*** 5441,5449 ****
if (!did_settmode)
if (tmode == TMODE_RAW)
settmode(TMODE_RAW); // set to raw mode
- # ifdef FEAT_TITLE
resettitle();
- # endif
vim_free(argv);
vim_free(tofree1);
vim_free(tofree2);
--- 5427,5433 ----
*** ../vim-8.2.3698/src/os_win32.c 2021-11-18 18:52:08.828648753 +0000
--- src/os_win32.c 2021-11-29 20:25:51.981558445 +0000
***************
*** 46,52 ****
#endif

#ifndef PROTO
! # if defined(FEAT_TITLE) && !defined(FEAT_GUI_MSWIN)
# include <shellapi.h>
# endif
#endif
--- 46,52 ----
#endif

#ifndef PROTO
! # if !defined(FEAT_GUI_MSWIN)
# include <shellapi.h>
# endif
#endif
***************
*** 2683,2689 ****
static ConsoleBuffer g_cbNonTermcap = { 0 };
static ConsoleBuffer g_cbTermcap = { 0 };

- # ifdef FEAT_TITLE
char g_szOrigTitle[256] = { 0 };
HWND g_hWnd = NULL; // also used in os_mswin.c
static HICON g_hOrigIconSmall = NULL;
--- 2683,2688 ----
***************
*** 2692,2703 ****
static BOOL g_fCanChangeIcon = FALSE;

// ICON* are not defined in VC++ 4.0
! # ifndef ICON_SMALL
! # define ICON_SMALL 0
! # endif
! # ifndef ICON_BIG
! # define ICON_BIG 1
! # endif
/*
* GetConsoleIcon()
* Description:
--- 2691,2702 ----
static BOOL g_fCanChangeIcon = FALSE;

// ICON* are not defined in VC++ 4.0
! # ifndef ICON_SMALL
! # define ICON_SMALL 0
! # endif
! # ifndef ICON_BIG
! # define ICON_BIG 1
! # endif
/*
* GetConsoleIcon()
* Description:
***************
*** 2789,2795 ****
if (g_hVimIcon != NULL)
g_fCanChangeIcon = TRUE;
}
- # endif

static int g_fWindInitCalled = FALSE;
static int g_fTermcapMode = FALSE;
--- 2788,2793 ----
***************
*** 2850,2856 ****
GetConsoleMode(g_hConIn, &g_cmodein);
GetConsoleMode(g_hConOut, &g_cmodeout);

- # ifdef FEAT_TITLE
SaveConsoleTitleAndIcon();
/*
* Set both the small and big icons of the console window to Vim's icon.
--- 2848,2853 ----
***************
*** 2859,2865 ****
*/
if (g_fCanChangeIcon)
SetConsoleIcon(g_hWnd, g_hVimIcon, g_hVimIcon);
- # endif

ui_get_shellsize();

--- 2856,2861 ----
***************
*** 2909,2915 ****

if (g_fWindInitCalled)
{
- # ifdef FEAT_TITLE
mch_restore_title(SAVE_RESTORE_BOTH);
/*
* Restore both the small and big icons of the console window to
--- 2905,2910 ----
***************
*** 2918,2924 ****
*/
if (g_fCanChangeIcon && !g_fForceExit)
SetConsoleIcon(g_hWnd, g_hOrigIconSmall, g_hOrigIcon);
- # endif

# ifdef MCH_WRITE_DUMP
if (fdDump)
--- 2913,2918 ----
***************
*** 4757,4763 ****
{
int x = 0;
int tmode = cur_tmode;
- #ifdef FEAT_TITLE
WCHAR szShellTitle[512];

// Change the title to reflect that we are in a subshell.
--- 4751,4756 ----
***************
*** 4780,4786 ****
}
}
}
- #endif

out_flush();

--- 4773,4778 ----
***************
*** 4813,4821 ****
{
// Use a terminal window to run the command in.
x = mch_call_shell_terminal(cmd, options);
- # ifdef FEAT_TITLE
resettitle();
- # endif
return x;
}
}
--- 4805,4811 ----
***************
*** 5062,5070 ****
smsg(_("shell returned %d"), x);
msg_putchar('\n');
}
- #ifdef FEAT_TITLE
resettitle();
- #endif

signal(SIGINT, SIG_DFL);
#if defined(__GNUC__) && !defined(__MINGW32__)
--- 5052,5058 ----
***************
*** 5631,5639 ****
ResizeConBufAndWindow(g_hConOut, Columns, Rows);
}

- # ifdef FEAT_TITLE
resettitle();
- # endif

GetConsoleMode(g_hConIn, &cmodein);
if (g_fMouseActive)
--- 5619,5625 ----
*** ../vim-8.2.3698/src/regexp.c 2021-11-17 18:22:52.980044225 +0000
--- src/regexp.c 2021-11-29 20:26:23.361644335 +0000
***************
*** 2746,2753 ****
}
#endif

! #if (defined(FEAT_X11) && (defined(FEAT_TITLE) || defined(FEAT_XCLIPBOARD))) \
! || defined(PROTO)
/*
* Return whether "prog" is currently being executed.
*/
--- 2746,2752 ----
}
#endif

! #if defined(FEAT_X11) || defined(PROTO)
/*
* Return whether "prog" is currently being executed.
*/
*** ../vim-8.2.3698/src/term.c 2021-11-19 11:27:49.099056921 +0000
--- src/term.c 2021-11-29 20:27:00.013734540 +0000
***************
*** 2123,2131 ****
{
starttermcap(); // may change terminal mode
setmouse(); // may start using the mouse
- #ifdef FEAT_TITLE
maketitle(); // may display window title
- #endif
}

// display initial screen after ttest() checking. jw.
--- 2123,2129 ----
***************
*** 3091,3098 ****
}
#endif

! #if (defined(FEAT_TITLE) && (defined(UNIX) || defined(VMS) \
! || defined(MACOS_X))) || defined(PROTO)
/*
* Generic function to set window title, using t_ts and t_fs.
*/
--- 3089,3095 ----
}
#endif

! #if (defined(UNIX) || defined(VMS) || defined(MACOS_X)) || defined(PROTO)
/*
* Generic function to set window title, using t_ts and t_fs.
*/
***************
*** 3505,3513 ****

if (starting != NO_SCREEN)
{
- #ifdef FEAT_TITLE
maketitle();
! #endif
changed_line_abv_curs();
invalidate_botline();

--- 3502,3509 ----

if (starting != NO_SCREEN)
{
maketitle();
!
changed_line_abv_curs();
invalidate_botline();

*** ../vim-8.2.3698/src/ui.c 2021-06-29 19:22:27.651393066 +0100
--- src/ui.c 2021-11-29 20:27:13.269764586 +0000
***************
*** 1175,1185 ****
gui_update_scrollbars(FALSE);
# endif
}
! #ifdef FEAT_TITLE
// File may have been changed from 'readonly' to 'noreadonly'
if (need_maketitle)
maketitle();
- #endif
}

#if defined(HAVE_INPUT_METHOD) || defined(PROTO)
--- 1175,1184 ----
gui_update_scrollbars(FALSE);
# endif
}
!
// File may have been changed from 'readonly' to 'noreadonly'
if (need_maketitle)
maketitle();
}

#if defined(HAVE_INPUT_METHOD) || defined(PROTO)
*** ../vim-8.2.3698/src/version.c 2021-11-29 19:18:33.910686983 +0000
--- src/version.c 2021-11-29 20:32:45.682168728 +0000
***************
*** 652,662 ****
#else
"-timers",
#endif
- #ifdef FEAT_TITLE
"+title",
- #else
- "-title",
- #endif
#ifdef FEAT_TOOLBAR
"+toolbar",
#else
--- 652,658 ----
*** ../vim-8.2.3698/src/window.c 2021-11-25 13:04:44.618340595 +0000
--- src/window.c 2021-11-29 20:27:36.713814601 +0000
***************
*** 4818,4826 ****
apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
}

- #ifdef FEAT_TITLE
maketitle();
- #endif
curwin->w_redr_status = TRUE;
#ifdef FEAT_TERMINAL
if (bt_terminal(curwin->w_buffer))
--- 4818,4824 ----
*** ../vim-8.2.3698/src/globals.h 2021-11-25 13:39:22.591524947 +0000
--- src/globals.h 2021-11-29 20:28:00.605861536 +0000
***************
*** 252,260 ****
EXTERN int need_wait_return INIT(= 0); // need to wait for return later
EXTERN int did_wait_return INIT(= FALSE); // wait_return() was used and
// nothing written since then
- #ifdef FEAT_TITLE
EXTERN int need_maketitle INIT(= TRUE); // call maketitle() soon
- #endif

EXTERN int quit_more INIT(= FALSE); // 'q' hit at "--more--" msg
#if defined(UNIX) || defined(VMS) || defined(MACOS_X)
--- 252,258 ----
***************
*** 1037,1053 ****
*/
// length of char in bytes, including following composing chars
EXTERN int (*mb_ptr2len)(char_u *p) INIT(= latin_ptr2len);
// idem, with limit on string length
EXTERN int (*mb_ptr2len_len)(char_u *p, int size) INIT(= latin_ptr2len_len);
// byte length of char
EXTERN int (*mb_char2len)(int c) INIT(= latin_char2len);
! // convert char to bytes, return the length
EXTERN int (*mb_char2bytes)(int c, char_u *buf) INIT(= latin_char2bytes);
EXTERN int (*mb_ptr2cells)(char_u *p) INIT(= latin_ptr2cells);
EXTERN int (*mb_ptr2cells_len)(char_u *p, int size) INIT(= latin_ptr2cells_len);
EXTERN int (*mb_char2cells)(int c) INIT(= latin_char2cells);
EXTERN int (*mb_off2cells)(unsigned off, unsigned max_off) INIT(= latin_off2cells);
EXTERN int (*mb_ptr2char)(char_u *p) INIT(= latin_ptr2char);
EXTERN int (*mb_head_off)(char_u *base, char_u *p) INIT(= latin_head_off);

# if defined(USE_ICONV) && defined(DYNAMIC_ICONV)
--- 1035,1060 ----
*/
// length of char in bytes, including following composing chars
EXTERN int (*mb_ptr2len)(char_u *p) INIT(= latin_ptr2len);
+
// idem, with limit on string length
EXTERN int (*mb_ptr2len_len)(char_u *p, int size) INIT(= latin_ptr2len_len);
+
// byte length of char
EXTERN int (*mb_char2len)(int c) INIT(= latin_char2len);
!
! // Convert char "c" to bytes in "buf", return the length. "buf" must have room
! // for at least 6 bytes.
EXTERN int (*mb_char2bytes)(int c, char_u *buf) INIT(= latin_char2bytes);
+
EXTERN int (*mb_ptr2cells)(char_u *p) INIT(= latin_ptr2cells);
EXTERN int (*mb_ptr2cells_len)(char_u *p, int size) INIT(= latin_ptr2cells_len);
EXTERN int (*mb_char2cells)(int c) INIT(= latin_char2cells);
EXTERN int (*mb_off2cells)(unsigned off, unsigned max_off) INIT(= latin_off2cells);
EXTERN int (*mb_ptr2char)(char_u *p) INIT(= latin_ptr2char);
+
+ // Byte offset from "p" to the start of a character, including any composing
+ // characters. "base" must be the start of the string, which must be NUL
+ // terminated.
EXTERN int (*mb_head_off)(char_u *base, char_u *p) INIT(= latin_head_off);

# if defined(USE_ICONV) && defined(DYNAMIC_ICONV)
***************
*** 1402,1408 ****
// table to store parsed 'wildmode'
EXTERN char_u wim_flags[4];

! #if defined(FEAT_TITLE) && defined(FEAT_STL_OPT)
// whether titlestring and iconstring contains statusline syntax
# define STL_IN_ICON 1
# define STL_IN_TITLE 2
--- 1409,1415 ----
// table to store parsed 'wildmode'
EXTERN char_u wim_flags[4];

! #if defined(FEAT_STL_OPT)
// whether titlestring and iconstring contains statusline syntax
# define STL_IN_ICON 1
# define STL_IN_TITLE 2
*** ../vim-8.2.3698/src/option.h 2021-10-17 14:13:04.832665843 +0100
--- src/option.h 2021-11-29 20:28:17.637892642 +0000
***************
*** 657,666 ****
EXTERN int p_arshape; // 'arabicshape'
# endif
#endif
- #ifdef FEAT_TITLE
EXTERN int p_icon; // 'icon'
EXTERN char_u *p_iconstring; // 'iconstring'
- #endif
EXTERN int p_ic; // 'ignorecase'
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
EXTERN char_u *p_imak; // 'imactivatekey'
--- 657,664 ----
***************
*** 986,997 ****
EXTERN int p_to; // 'tildeop'
EXTERN int p_timeout; // 'timeout'
EXTERN long p_tm; // 'timeoutlen'
- #ifdef FEAT_TITLE
EXTERN int p_title; // 'title'
EXTERN long p_titlelen; // 'titlelen'
EXTERN char_u *p_titleold; // 'titleold'
EXTERN char_u *p_titlestring; // 'titlestring'
- #endif
EXTERN char_u *p_tsr; // 'thesaurus'
EXTERN int p_ttimeout; // 'ttimeout'
EXTERN long p_ttm; // 'ttimeoutlen'
--- 984,993 ----
*** ../vim-8.2.3698/src/optiondefs.h 2021-11-24 16:19:41.389010087 +0000
--- src/optiondefs.h 2021-11-29 20:28:52.197950018 +0000
***************
*** 1313,1330 ****
(char_u *)&p_hls, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"icon", NULL, P_BOOL|P_VI_DEF,
- #ifdef FEAT_TITLE
(char_u *)&p_icon, PV_NONE,
- #else
- (char_u *)NULL, PV_NONE,
- #endif
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"iconstring", NULL, P_STRING|P_VI_DEF|P_MLE,
- #ifdef FEAT_TITLE
(char_u *)&p_iconstring, PV_NONE,
- #else
- (char_u *)NULL, PV_NONE,
- #endif
{(char_u *)"", (char_u *)0L} SCTX_INIT},
{"ignorecase", "ic", P_BOOL|P_VI_DEF,
(char_u *)&p_ic, PV_NONE,
--- 1313,1322 ----
***************
*** 2651,2685 ****
(char_u *)&p_tm, PV_NONE,
{(char_u *)1000L, (char_u *)0L} SCTX_INIT},
{"title", NULL, P_BOOL|P_VI_DEF,
- #ifdef FEAT_TITLE
(char_u *)&p_title, PV_NONE,
- #else
- (char_u *)NULL, PV_NONE,
- #endif
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
{"titlelen", NULL, P_NUM|P_VI_DEF,
- #ifdef FEAT_TITLE
(char_u *)&p_titlelen, PV_NONE,
- #else
- (char_u *)NULL, PV_NONE,
- #endif
{(char_u *)85L, (char_u *)0L} SCTX_INIT},
{"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE|P_NO_MKRC,
- #ifdef FEAT_TITLE
(char_u *)&p_titleold, PV_NONE,
{(char_u *)N_("Thanks for flying Vim"),
(char_u *)0L}
- #else
- (char_u *)NULL, PV_NONE,
- {(char_u *)0L, (char_u *)0L}
- #endif
SCTX_INIT},
{"titlestring", NULL, P_STRING|P_VI_DEF|P_MLE,
- #ifdef FEAT_TITLE
(char_u *)&p_titlestring, PV_NONE,
- #else
- (char_u *)NULL, PV_NONE,
- #endif
{(char_u *)"", (char_u *)0L} SCTX_INIT},
{"toolbar", "tb", P_STRING|P_ONECOMMA|P_VI_DEF|P_NODUP,
#if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
--- 2643,2660 ----
*** ../vim-8.2.3698/runtime/doc/options.txt 2021-11-24 16:32:50.716422474 +0000
--- runtime/doc/options.txt 2021-11-29 20:31:44.470136137 +0000
***************
*** 4176,4183 ****
*'icon'* *'noicon'*
'icon' boolean (default off, on when title can be restored)
global
- {not available when compiled without the |+title|
- feature}
When on, the icon text of the window will be set to the value of
'iconstring' (if it is not empty), or to the name of the file
currently being edited. Only the last part of the name is used.
--- 4190,4195 ----
***************
*** 4194,4206 ****
*'iconstring'*
'iconstring' string (default "")
global
- {not available when compiled without the |+title|
- feature}
When this option is not empty, it will be used for the icon text of
the window. This happens only when the 'icon' option is on.
Only works if the terminal supports setting window icon text
(currently only X11 GUI and terminals with a non-empty 't_IS' option).
! Does not work for MS Windows.
When Vim was compiled with HAVE_X11 defined, the original icon will be
restored if possible |X11|.
When this option contains printf-style '%' items, they will be
--- 4206,4216 ----
*'iconstring'*
'iconstring' string (default "")
global
When this option is not empty, it will be used for the icon text of
the window. This happens only when the 'icon' option is on.
Only works if the terminal supports setting window icon text
(currently only X11 GUI and terminals with a non-empty 't_IS' option).
! Does not work for MS-Windows.
When Vim was compiled with HAVE_X11 defined, the original icon will be
restored if possible |X11|.
When this option contains printf-style '%' items, they will be
***************
*** 8119,8126 ****
*'title'* *'notitle'*
'title' boolean (default off, on when title can be restored)
global
- {not available when compiled without the |+title|
- feature}
When on, the title of the window will be set to the value of
'titlestring' (if it is not empty), or to:
filename [+=-] (path) - VIM
--- 8137,8142 ----
***************
*** 8154,8161 ****
*'titlelen'*
'titlelen' number (default 85)
global
- {not available when compiled without the |+title|
- feature}
Gives the percentage of 'columns' to use for the length of the window
title. When the title is longer, only the end of the path name is
shown. A '<' character before the path name is used to indicate this.
--- 8170,8175 ----
***************
*** 8169,8176 ****
*'titleold'*
'titleold' string (default "Thanks for flying Vim")
global
- {only available when compiled with the |+title|
- feature}
This option will be used for the window title when exiting Vim if the
original title cannot be restored. Only happens if 'title' is on or
'titlestring' is not empty.
--- 8183,8188 ----
***************
*** 8179,8186 ****
*'titlestring'*
'titlestring' string (default "")
global
- {not available when compiled without the |+title|
- feature}
When this option is not empty, it will be used for the title of the
window. This happens only when the 'title' option is on.
Only works if the terminal supports setting window titles (currently
--- 8191,8196 ----
*** ../vim-8.2.3698/runtime/doc/various.txt 2021-09-04 12:43:57.928929327 +0100
--- runtime/doc/various.txt 2021-11-29 20:31:58.878145228 +0000
***************
*** 471,477 ****
N *+textprop* |text-properties|
*+tgetent* non-Unix only: able to use external termcap
N *+timers* the |timer_start()| function
! N *+title* Setting the window 'title' and 'icon'
N *+toolbar* |gui-toolbar|
T *+user_commands* User-defined commands. |user-commands|
Always enabled since 8.1.1210.
--- 471,477 ----
N *+textprop* |text-properties|
*+tgetent* non-Unix only: able to use external termcap
N *+timers* the |timer_start()| function
! N *+title* Setting the window 'title' and 'icon'; Always enabled
N *+toolbar* |gui-toolbar|
T *+user_commands* User-defined commands. |user-commands|
Always enabled since 8.1.1210.
*** ../vim-8.2.3698/src/version.c 2021-11-29 19:18:33.910686983 +0000
--- src/version.c 2021-11-29 20:32:45.682168728 +0000
***************
*** 759,760 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 3699,
/**/

--
"I've been teaching myself to play the piano for about 5 years and now write
most of my songs on it, mainly because I can never find any paper."
Jeff Lynne, ELO's greatest hits

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages