- Update suse.vimrc to stop remembering file positions for git
commit cases. This fixes bnc#538369 and based on msys commits 1ef258e and 65ffc90. OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=251
This commit is contained in:
committed by
Git OBS Bridge
parent
b4f1603c9e
commit
cc4df34c0a
21
suse.vimrc
21
suse.vimrc
@@ -265,16 +265,17 @@ endif
|
||||
map! <Esc>[3~ <Delete>
|
||||
map <ESC>[3~ x
|
||||
|
||||
" Only do this part when compiled with support for autocommands.
|
||||
if has("autocmd")
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid or when inside an event handler
|
||||
" (happens when dropping a file on gvim).
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||
\ exe "normal g`\"" |
|
||||
\ endif
|
||||
|
||||
" Only do this part when compiled with support for autocommands.
|
||||
if has("autocmd")
|
||||
"Remember the positions in files with some git-specific exceptions"
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 0 && line("'\"") <= line("$")
|
||||
\ && expand("%") !~ "COMMIT_EDITMSG"
|
||||
\ && expand("%") !~ "ADD_EDIT.patch"
|
||||
\ && expand("%") !~ "addp-hunk-edit.diff"
|
||||
\ && expand("%") !~ "git-rebase-todo" |
|
||||
\ exe "normal g`\"" |
|
||||
\ endif
|
||||
endif " has("autocmd")
|
||||
|
||||
" Changed default required by SuSE security team--be aware if enabling this
|
||||
|
Reference in New Issue
Block a user