aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/os/users.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/os/users.c b/src/nvim/os/users.c
index a57ba41af1..637a86c74f 100644
--- a/src/nvim/os/users.c
+++ b/src/nvim/os/users.c
@@ -41,7 +41,12 @@ int os_get_usernames(garray_T *users)
// Return OK if a name found.
int os_get_user_name(char *s, size_t len)
{
+#ifdef UNIX
return os_get_uname(getuid(), s, len);
+#else
+ // TODO(equalsraf): Windows GetUserName()
+ return os_get_uname(0, s, len);
+#endif
}
// Insert user name for "uid" in s[len].