Additional observations which might be obvious to a Vim maintainer / packager, but came as news to me:
1. This (Vim's manipulation, via '\033]%d;%s\007' output sequences, of xterm title & icon title, unless the user has done 'set notitle' and/or 'set noicon') only happens with Vim binaries compiled with X11 support. In Ubuntu & Debian packaging this means the packages 'vim-gtk', 'vim-gtk3', 'vim-gnome', and probably 'vim-athena'; but not 'vim-tiny', 'vim', nor 'vim-nox'.
2. It only happens when Vim is aware that it is running under X, and can contact the X server. For instance, if $DISPLAY is unset or wrong; or if one is running `ssh` in the xterm without having arranged for X communication (by `ssh -X` or by setting DISPLAY=$HOST:$DISP in the environment, and arranging for xterm_host to accept X connections from ssh_target_host); then no title twiddling occurs. (I didn't test whether `ssh -X` or DISPLAY=$HOST:$DISP were sufficient to enable it.)
#2 was somewhat surprising to me since the manipulations are done by ASCII output chars in-band to the normal terminal communications channel. Why should X protocol be involved? Approximately: Vim wants to read the terminal's current title so that it can change it back on exit. Although there's an escape sequence for that, it can be used for malicious purposes and is often disabled at xterm build time. X protocol is therefore the only reliable channel with which to *read* the current title.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tuesday, May 23, 2017
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment