aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/diff.txt
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-03 08:17:38 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-12-03 08:35:13 +0800
commit9671908c682dc3fc4e939f44a636457db6f3e5a4 (patch)
treecc8180e5890f33950be616471ec521b0f08dc5a4 /runtime/doc/diff.txt
parent2ae0d32a72c3ee207b6f9cd48c4beffa6e7c774f (diff)
downloadrneovim-9671908c682dc3fc4e939f44a636457db6f3e5a4.tar.gz
rneovim-9671908c682dc3fc4e939f44a636457db6f3e5a4.tar.bz2
rneovim-9671908c682dc3fc4e939f44a636457db6f3e5a4.zip
vim-patch:8.2.3900: it is not easy to use a script-local function for an option
Problem: It is not easy to use a script-local function for an option. Solution: recognize s: and <SID> at the start of the expression. (Yegappan Lakshmanan, closes vim/vim#9401) https://github.com/vim/vim/commit/8bb65f230d3025037f34021a72616038da0601ee Omit duplicate docs in fold.txt: removed in a later runtime update. Cherry-pick test_diffmode.vim changes from patch 8.2.1432. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'runtime/doc/diff.txt')
-rw-r--r--runtime/doc/diff.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index b5a3891d3f..f38f123393 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -388,6 +388,11 @@ mode, so that a CTRL-Z doesn't end the text on DOS.
The `redraw!` command may not be needed, depending on whether executing a
shell command shows something on the display or not.
+If the 'diffexpr' expression starts with s: or |<SID>|, then it is replaced
+with the script ID (|local-function|). Example: >
+ set diffexpr=s:MyDiffExpr()
+ set diffexpr=<SID>SomeDiffExpr()
+<
*E810* *E97*
Vim will do a test if the diff output looks alright. If it doesn't, you will
get an error message. Possible causes:
@@ -439,4 +444,9 @@ evaluating 'patchexpr'. This hopefully avoids that files in the current
directory are accidentally patched. Vim will also delete files starting with
v:fname_in and ending in ".rej" and ".orig".
+If the 'patchexpr' expression starts with s: or |<SID>|, then it is replaced
+with the script ID (|local-function|). Example: >
+ set patchexpr=s:MyPatchExpr()
+ set patchexpr=<SID>SomePatchExpr()
+<
vim:tw=78:ts=8:noet:ft=help:norl: