|
@ -27,7 +27,11 @@ local aucmd_dict = { |
|
|
BufRead = { |
|
|
BufRead = { |
|
|
{ |
|
|
{ |
|
|
-- Return cursor to where it was previously when re-opening a file |
|
|
-- Return cursor to where it was previously when re-opening a file |
|
|
command = [[if @% !~# '\.git[\/\\]COMMIT_EDITMSG$' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif]] |
|
|
|
|
|
|
|
|
callback = function() |
|
|
|
|
|
if vim.fn.expand('%:p') ~= '.git/COMMIT_EDITMSG' and vim.fn.line("'\"") > 1 and vim.fn.line("'\"") <= vim.fn.line("$") then |
|
|
|
|
|
vim.cmd("normal! g`\"") |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|