aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-06 16:29:12 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-02-06 16:29:12 +0800
commitd65ee129143fedd43178c9be52095b5d2d06b5c2 (patch)
treebbf175cc42425a37cbdef14efde2892bdb07683b /src/nvim/eval.lua
parent8215c05945054755b2c3cadae198894372dbfe0f (diff)
downloadrneovim-d65ee129143fedd43178c9be52095b5d2d06b5c2.tar.gz
rneovim-d65ee129143fedd43178c9be52095b5d2d06b5c2.tar.bz2
rneovim-d65ee129143fedd43178c9be52095b5d2d06b5c2.zip
vim-patch:8.2.1741: pathshorten() only supports using one character
Problem: pathshorten() only supports using one character. Solution: Add an argument to control the length. (closes vim/vim#7006) https://github.com/vim/vim/commit/6a33ef0deb5c75c003a9f3bd1c57f3ca5e77327e Cherry-pick a line in test from patch 8.2.0634. Use Nvim's config paths in docs. shorten_dir() returning a pointer looks a bit confusing here, as it is actually the same pointer passed to it, and it doesn't really reduce much code, so change it back to void. Assigning rettv->vval.v_string = NULL is not needed if a pointer is within 64 bits. While this is usually the case, I'm not sure if it can be taken for granted.
Diffstat (limited to 'src/nvim/eval.lua')
-rw-r--r--src/nvim/eval.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 5c85d764fb..eedc8ac45d 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -262,7 +262,7 @@ return {
nextnonblank={args=1, base=1},
nr2char={args={1, 2}, base=1},
['or']={args=2, base=1},
- pathshorten={args=1, base=1},
+ pathshorten={args={1, 2}, base=1},
pow={args=2, base=1},
prevnonblank={args=1, base=1},
printf={args=varargs(1), base=2},