0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.0.1295: cannot automatically get a server name in a terminal

Problem:    Cannot automatically get a server name in a terminal.
Solution:   Add the --enable-autoservername flag to configure. (Cimbali,
            closes #2317)
This commit is contained in:
Bram Moolenaar
2017-11-12 19:21:51 +01:00
parent 2f27aab8e6
commit e42a6d2509
10 changed files with 63 additions and 4 deletions

View File

@@ -3673,12 +3673,18 @@ prepare_server(mparm_T *parmp)
/*
* Register for remote command execution with :serversend and --remote
* unless there was a -X or a --servername '' on the command line.
* Only register nongui-vim's with an explicit --servername argument.
* Only register nongui-vim's with an explicit --servername argument,
* or when compiling with autoservername.
* When running as root --servername is also required.
*/
if (X_DISPLAY != NULL && parmp->servername != NULL && (
# ifdef FEAT_GUI
(gui.in_use
# if defined(FEAT_AUTOSERVERNAME) || defined(FEAT_GUI)
(
# if defined(FEAT_AUTOSERVERNAME)
1
# else
gui.in_use
# endif
# ifdef UNIX
&& getuid() != ROOT_UID
# endif