The autocommand exists in these files:
runtime/doc/eval.txt
runtime/doc/usr_05.txt
runtime/vimrc_example.vim

eval.txt contains the most up-to-date autocommand, so adjust the others
to it:
  * don't jump when the mark is in the first line
  * use :normal! instead of :normal to avoid mappings
  * use '" instead of `" with the g command for consistency
---
 runtime/doc/usr_05.txt    |    4 ++--
 runtime/vimrc_example.vim |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt
index 0bac988..ac0d7e4 100644
--- a/runtime/doc/usr_05.txt
+++ b/runtime/doc/usr_05.txt
@@ -205,8 +205,8 @@ to 78, but only locally in one file.
 
                                                        *restore-cursor*  >
        autocmd BufReadPost *
-           \ if line("'\"") > 0 && line("'\"") <= line("$") |
-           \   exe "normal g`\"" |
+           \ if line("'\"") > 1 && line("'\"") <= line("$") |
+           \   exe "normal! g'\"" |
            \ endif
 
 Another autocommand.  This time it is used after reading any file.  The
diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim
index b35100c..1017eb9 100644
--- a/runtime/vimrc_example.vim
+++ b/runtime/vimrc_example.vim
@@ -76,7 +76,7 @@ if has("autocmd")
   " position when opening a file.
   autocmd BufReadPost *
     \ if line("'\"") > 1 && line("'\"") <= line("$") |
-    \   exe "normal! g`\"" |
+    \   exe "normal! g'\"" |
     \ endif
 
   augroup END
-- 
1.6.3.1.20.ga30f


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui