Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prev_hunk and next_hunk focuses on the preview when there's only one hunk #707

Closed
utilyre opened this issue Jan 3, 2023 · 0 comments · Fixed by #709
Closed

prev_hunk and next_hunk focuses on the preview when there's only one hunk #707

utilyre opened this issue Jan 3, 2023 · 0 comments · Fixed by #709
Labels
bug Something isn't working

Comments

@utilyre
Copy link

utilyre commented Jan 3, 2023

Description

As the title explains, if I only have one hunk in a buffer and open the preview menu on that hunk, then call prev_hunk or next_hunk, it'll focus on the preview window.

Neovim version

NVIM v0.9.0-dev-4d4e697 Build type: Release LuaJIT 2.1.0-beta3 Compiled by utilyre Features: +acl +iconv +tui See ":help feature-compile" system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/share/nvim" Run :checkhealth for more info

Operating system and version

Archlinux

Expected behavior

Should do nothing.

Actual behavior

Focuses the preview window.

Minimal config

vim.o.packpath = '/tmp/nvim/site'

local plugins = {
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
  -- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
}

for name, url in pairs(plugins) do
  local install_path = '/tmp/nvim/site/pack/test/start/'..name
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
  end
end

require('gitsigns').setup{
  debug_mode = true, -- You must add this to enable debug messages
  -- ADD GITSIGNS CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
}

-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE

Steps to reproduce

  1. nvim --clean -u minimal.lua
  2. Move cursor on a hunk.
  3. :Gitsigns preview_hunk
  4. :Gitsigns next_hunk or :Gitsigns prev_hunk

Gitsigns debug messages

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant