[doc][patch] Duplicated description about restoring the cursor position

12 views
Skip to first unread message

ktakat...@gmail.com

unread,
Jan 21, 2019, 6:03:35 AM1/21/19
to vim_dev
Hi,

`:help restore-cursor` (in usr_05.txt) says:
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif

and `:help last-position-jump` (in eval.txt) says:
:au BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif

Both say almost the same thing. And the actual definition in the
defaults.vim is similar to the latter one but slightly different:
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif

`line("'\"") > 1` is changed to `line("'\"") >= 1`.
My suggestion is updating `:h restore-cursor` to the actual definition and
remove the duplicated description from eval.txt.
Please check the attached patch.


Another concerning: `:help 05.2` explains each line in vimrc_example.vim,
however some of the part is now in the defaults.vim. The section needs to
be updated.


Regards,
Ken Takata

doc-update-restore-cursor.patch
Reply all
Reply to author
Forward
0 new messages