aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/run-api-tests.exp4
-rw-r--r--src/nvim/os/server.c7
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