Browse Source

fix: fugitive git log command

master
Tovi Jaeschke-Rogers 1 week ago
parent
commit
d9c432508a
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      .config/nvim/lua/plugins/fugitive.lua

+ 7
- 5
.config/nvim/lua/plugins/fugitive.lua View File

@ -26,14 +26,16 @@ return {
local opts = { noremap = true, silent = true }
vim.keymap.set("n", "<leader>gg", "<cmd>Git<CR>", opts)
vim.keymap.set("n", "<leader>gg", function ()
vim.cmd("Git")
end, opts)
vim.keymap.set("v", "<leader>gl", function()
local startPos = vim.fn.getpos("'<")
local endPos = vim.fn.getpos("'>")
local startPos = vim.fn.getpos("v")
local endPos = vim.fn.getpos(".")
local startLine = startPos[2]
local endLine = endPos[2]
local startLine = math.min(startPos[2], endPos[2])
local endLine = math.max(startPos[2], endPos[2])
if startLine == 0 or endLine == 0 then
vim.notify(vim.inspect(vim.fn.getpos("'<")) .. " to " .. vim.inspect(vim.fn.getpos("'>")))


Loading…
Cancel
Save