summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/autocmd.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/autocmd.lua b/plugin/autocmd.lua
index 1597a21..ee96371 100644
--- a/plugin/autocmd.lua
+++ b/plugin/autocmd.lua
@@ -22,6 +22,9 @@ autocmd({ "BufWritePre" }, {
-- Restore cursor's position in buffer from previous session.
autocmd({ "BufReadPost" }, {
callback = function(args)
+ if vim.bo.filetype == "gitcommit" then
+ return
+ end
local mark = vim.api.nvim_buf_get_mark(args.buf, '"')
local count = vim.api.nvim_buf_line_count(args.buf)
if mark[1] > 0 and mark[1] <= count then