diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-09-13 16:20:50 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-09-13 21:35:47 -0300 |
commit | 2d1b5589e850ac7e35574790539cff6430bfa14f (patch) | |
tree | 030ebf4fe757b1daf679e461279b787339c40aff | |
parent | 5778c25c019f01c3e0249da18398abdca3f9b002 (diff) | |
download | rneovim-2d1b5589e850ac7e35574790539cff6430bfa14f.tar.gz rneovim-2d1b5589e850ac7e35574790539cff6430bfa14f.tar.bz2 rneovim-2d1b5589e850ac7e35574790539cff6430bfa14f.zip |
server: Rename address environment variable
To follow the pattern of using NVIM for technical descriptions, it was renamed
to NVIM_LISTEN_ADDRESS
-rwxr-xr-x | scripts/run-api-tests.exp | 4 | ||||
-rw-r--r-- | src/nvim/os/server.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/scripts/run-api-tests.exp b/scripts/run-api-tests.exp index 6209a77cfc..27c9c963e5 100755 --- a/scripts/run-api-tests.exp +++ b/scripts/run-api-tests.exp @@ -11,8 +11,8 @@ set run_nvim [split [lindex $argv 1] " "] # don't echo to stdout log_user 0 -# set NEOVIM_LISTEN_ADDRESS, so nvim will listen on a known socket -set env(NEOVIM_LISTEN_ADDRESS) "/tmp/nvim-[exec date +%s%N].sock" +# set NVIM_LISTEN_ADDRESS, so nvim will listen on a known socket +set env(NVIM_LISTEN_ADDRESS) "/tmp/nvim-[exec date +%s%N].sock" # start nvim spawn {*}$run_nvim # save the job descriptor diff --git a/src/nvim/os/server.c b/src/nvim/os/server.c index 2e8934ecfb..66dd0ecd88 100644 --- a/src/nvim/os/server.c +++ b/src/nvim/os/server.c @@ -17,6 +17,7 @@ #define MAX_CONNECTIONS 32 #define ADDRESS_MAX_SIZE 256 #define NEOVIM_DEFAULT_TCP_PORT 7450 +#define LISTEN_ADDRESS_ENV_VAR "NVIM_LISTEN_ADDRESS" typedef enum { kServerTypeTcp, @@ -51,13 +52,13 @@ void server_init(void) { servers = pmap_new(cstr_t)(); - if (!os_getenv("NEOVIM_LISTEN_ADDRESS")) { + if (!os_getenv(LISTEN_ADDRESS_ENV_VAR)) { char *listen_address = (char *)vim_tempname(); - os_setenv("NEOVIM_LISTEN_ADDRESS", listen_address, 1); + os_setenv(LISTEN_ADDRESS_ENV_VAR, listen_address, 1); free(listen_address); } - server_start((char *)os_getenv("NEOVIM_LISTEN_ADDRESS")); + server_start((char *)os_getenv(LISTEN_ADDRESS_ENV_VAR)); } /// Teardown the server module |