From cf6f78c3f5660bcf8b974175b2b40776e34e3c5d Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Sun, 10 May 2026 02:19:45 +0200 Subject: [PATCH] fix(keymap): add TUI scroll binds --- lua/core/keymap.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lua/core/keymap.lua b/lua/core/keymap.lua index f0b40c7..872469b 100644 --- a/lua/core/keymap.lua +++ b/lua/core/keymap.lua @@ -31,6 +31,29 @@ end) -- Enable window commands in terminal mode vim.keymap.set("t", "", "") +--- Binds for scrolling in TUIs +vim.keymap.set("t", "", function() + vim.api.nvim_feedkeys( + vim.api.nvim_replace_termcodes("", true, false, true), + "n", + false + ) +end) +vim.keymap.set("t", "", function() + vim.api.nvim_feedkeys( + vim.api.nvim_replace_termcodes("", true, false, true), + "n", + false + ) +end) +vim.keymap.set("t", "", function() + vim.api.nvim_feedkeys( + vim.api.nvim_replace_termcodes("", true, false, true), + "n", + false + ) +end) + -- Use :diffput/get instead of normal one to allow staging visual selection vim.keymap.set({ "n", "x" }, "dp", ":diffput") vim.keymap.set({ "n", "x" }, "do", ":diffget")