aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2022-06-17 01:23:48 +0200
committerGitHub <noreply@github.com>2022-06-17 01:23:48 +0200
commitc57f6b28d71df1eb6e967381a44a1c038a75698d (patch)
tree02a46f56a250d5f59b767ab3af09cf2b72c60d34 /src/nvim/path.c
parent279bc71f3c24928de7d46034168fa105592eb1fa (diff)
parent1f2c2a35ad14cfac002d87073471bd84a52860bf (diff)
downloadrneovim-c57f6b28d71df1eb6e967381a44a1c038a75698d.tar.gz
rneovim-c57f6b28d71df1eb6e967381a44a1c038a75698d.tar.bz2
rneovim-c57f6b28d71df1eb6e967381a44a1c038a75698d.zip
Merge #8519 feat: name, test ids, sockets in stdpath(state)
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 7f47ce083d..9859ca7daa 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -88,7 +88,12 @@ FileComparison path_full_compare(char_u *const s1, char_u *const s2, const bool
return kDifferentFiles;
}
-/// Gets the tail (i.e., the filename segment) of a path `fname`.
+/// Gets the tail (filename segment) of path `fname`.
+///
+/// Examples:
+/// - "dir/file.txt" => "file.txt"
+/// - "file.txt" => "file.txt"
+/// - "dir/" => ""
///
/// @return pointer just past the last path separator (empty string, if fname
/// ends in a slash), or empty string if fname is NULL.