kitty-scrollback.nvim icon indicating copy to clipboard operation
kitty-scrollback.nvim copied to clipboard

feat: add option to completely disable paste window

Open MoltenMonster opened this issue 6 months ago • 5 comments

When I press i in scrollback opens the window and moves my cursor there. Is that the paste window?

MoltenMonster avatar Jun 21 '25 23:06 MoltenMonster

Hey, yes that is the paste window.

https://github.com/mikesmithgh/kitty-scrollback.nvim/issues/287#issuecomment-2543218762 provides details if you want to disable it.

Hey, yep there is a configuration option for that

-- boolean? If true, the yank_register copies content to the paste window. If false, disable yank to paste window
yank_register_enabled = true,

see https://github.com/mikesmithgh/kitty-scrollback.nvim?tab=readme-ov-file#configuration-options for more options.

For example, if you use lazy.nvim

return { { 'mikesmithgh/kitty-scrollback.nvim', enabled = true, cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth' }, event = { 'User KittyScrollbackLaunch' }, config = function() require('kitty-scrollback').setup({ { paste_window = { yank_register_enabled = false, }, }, }) end, }, } I suppose the name for the option isn't obvious though. It would probably just make more sense to have it enabled.

mikesmithgh avatar Jun 25 '25 15:06 mikesmithgh

This is my plugin config. When I press i it still shows the paste window.

	{
		"mikesmithgh/kitty-scrollback.nvim",
		lazy = true,
		cmd = {
			"KittyScrollbackGenerateKittens",
			"KittyScrollbackCheckHealth",
			"KittyScrollbackGenerateCommandLineEditing",
		},
		event = { "User KittyScrollbackLaunch" },
		config = function()
			require("kitty-scrollback").setup({
				{
					paste_window = {
						yank_register_enabled = false,
					},
					status_window = {
						autoclose = false, -- <-- set this to false
					},
				},
			})
		end,
	},

MoltenMonster avatar Jun 25 '25 16:06 MoltenMonster

@Oneechan69 I see. This will only disable the paste window on yank events but not on term enter events. So yy would not open it but i or a would still open it.

I'll make this a feature request 👍

mikesmithgh avatar Jun 25 '25 17:06 mikesmithgh

Hey, I just came here looking for a solution for a similar thing. I want to completely disable buffer window. I am happy with only being able to take current terminal into nvim. This is what I tried so far:

myconf = {
        status_window = {
          enabled = false,
          autoclose = false,
        },
        paste_window = {
          enabled = false,
          yank_register_enabled = false,
        },
        keymaps_enabled = false,
        kitty_get_text = {
          ansi = true,
        },
      },

3dyuval avatar Jun 28 '25 07:06 3dyuval

You can do this before calling setup, but be ware, it's monkey patching.

            local autocmds = require("kitty-scrollback.autocommands")
            autocmds.set_term_enter_autocmd = function(_) end
            autocmds.set_yank_post_autocmd = function() end

            require("kitty-scrollback").setup({ keymaps_enabled = false })        

RamilGN avatar Aug 05 '25 12:08 RamilGN