summaryrefslogtreecommitdiff
path: root/runtime/doc/cmdline.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/cmdline.txt')
-rw-r--r--runtime/doc/cmdline.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 5564f5d37..0c472bb61 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 8.2. Last change: 2021 May 30
+*cmdline.txt* For Vim version 8.2. Last change: 2021 Aug 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -170,7 +170,12 @@ CTRL-R {register} *c_CTRL-R* *c_<C-R>*
too.
When the result is a Float it's automatically
converted to a String.
- See |registers| about registers.
+ Note that when you only want to move the
+ cursor and not insert anything, you must make
+ sure the expression evaluates to an empty
+ string. E.g.: >
+ <C-R><C-R>=setcmdpos(2)[-1]<CR>
+< See |registers| about registers.
Implementation detail: When using the |expression| register
and invoking setcmdpos(), this sets the position before
inserting the resulting string. Use CTRL-R CTRL-R to set the