aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/usr_05.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/usr_05.txt')
-rw-r--r--runtime/doc/usr_05.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt
index d0206ba82d..2edef0ca23 100644
--- a/runtime/doc/usr_05.txt
+++ b/runtime/doc/usr_05.txt
@@ -175,10 +175,8 @@ This switches on three very clever mechanisms:
*restore-cursor* *last-position-jump* >
- autocmd BufReadPost *
- \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
- \ | exe "normal! g`\""
- \ | endif
+ autocmd BufRead * autocmd FileType <buffer> ++once
+ \ if &ft !~# 'commit\|rebase' && line("'\"") > 1 && line("'\"") <= line("$") | exe 'normal! g`"' | endif
Another autocommand. This time it is used after reading any file. The
complicated stuff after it checks if the '" mark is defined, and jumps to it