From 848779f332423acf2cd510a3a55c1f597a00272b Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 18 Dec 2020 14:34:21 -0500 Subject: [PATCH] do not set cursor position to last editing position for git commit messages --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index ebca7e9..ccd031f 100644 --- a/vimrc +++ b/vimrc @@ -165,7 +165,7 @@ if has("autocmd") " 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("$") | + \ if (bufname("%") =~ "COMMIT_EDITMSG") == 0 && line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif