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

Blame floating window isn't highlighting deleted lines #582

Closed
duboisf opened this issue Jun 15, 2022 · 2 comments · Fixed by #618
Closed

Blame floating window isn't highlighting deleted lines #582

duboisf opened this issue Jun 15, 2022 · 2 comments · Fixed by #618
Labels
bug Something isn't working

Comments

@duboisf
Copy link

duboisf commented Jun 15, 2022

Description

Seems that since #570 the floating window for blames isn't highlighting deleted lines.

Neovim version

nvim --version NVIM v0.7.0 Build type: Release LuaJIT 2.1.0-beta3 Compiled by runner@fv-az316-460 Features: +acl +iconv +tui See ":help feature-compile" system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/share/nvim" Run :checkhealth for more info

Operating system and version

Pop!_OS 22.04 LTS

Expected behavior

The deleted lines in the floating window are highlighted

image

Actual behavior

The deleted lines in the floating window aren't highlighted

image

Minimal config

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

local plugins = {
  one = 'https://github.com/rakr/vim-one',
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
}

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

vim.opt.termguicolors = true
vim.opt.background = 'dark'
vim.cmd 'colorscheme one'

require('gitsigns').setup {
  debug_mode = true, -- You must add this to enable debug messages
}

function _G.blame_line()
  require'gitsigns'.blame_line { full = true }
end

function _G.blame_line_working()
  vim.cmd 'hi link GitSignsDeleteLn DiffDelete'
  require'gitsigns'.blame_line { full = true }
end

Steps to reproduce

  1. gh clone lewis6991/gitsigns.nvim
  2. cd gitsigns.nvim
  3. git checkout c18e016864c92ecf9775abea1baaa161c28082c3
  4. nvim --clean -u minimal.lua README +144
  5. :lua blame_line()

Gitsigns debug messages

signs.init: Using vimfn signs                                                                                                                                                                                                                                                                                           
run_job: git --no-pager --literal-pathspecs --version                                                                                                                                                                                                                                                                   
fn: Deriving GitSignsAdd from GitGutterAdd                                                                                                                                                                                                                                                                              
fn: Deriving GitSignsChange from GitGutterChange                                                                                                                                                                                                                                                                        
fn: Deriving GitSignsDelete from GitGutterDelete                                                                                                                                                                                                                                                                        
fn: Deriving GitSignsAddNr from GitSignsAdd                                                                                                                                                                                                                                                                             
fn: Deriving GitSignsChangeNr from GitSignsChange                                                                                                                                                                                                                                                                       
fn: Deriving GitSignsDeleteNr from GitSignsDelete                                                                                                                                                                                                                                                                       
fn: Deriving GitSignsAddLn from DiffAdd                                                                                                                                                                                                                                                                                 
fn: Deriving GitSignsChangeLn from DiffChange                                                                                                                                                                                                                                                                           
fn: Deriving GitSignsCurrentLineBlame from NonText                                                                                                                                                                                                                                                                      
fn: Deriving GitSignsAddInline from TermCursor                                                                                                                                                                                                                                                                          
fn: Deriving GitSignsDeleteInline from TermCursor                                                                                                                                                                                                                                                                       
fn: Deriving GitSignsChangeInline from TermCursor                                                                                                                                                                                                                                                                       
fn: Deriving GitSignsAddLnInline from GitSignsAddInline                                                                                                                                                                                                                                                                 
fn: Deriving GitSignsChangeLnInline from GitSignsChangeInline                                                                                                                                                                                                                                                           
fn: Deriving GitSignsDeleteLnInline from GitSignsDeleteInline                                                                                                                                                                                                                                                           
fn: Deriving GitSignsAddLnVirtLn from GitSignsAddLn                                                                                                                                                                                                                                                                     
fn: Deriving GitSignsChangeVirtLn from GitSignsChangeLn                                                                                                                                                                                                                                                                 
fn: Deriving GitSignsDeleteVirtLn from DiffDelete                                                                                                                                                                                                                                                                       
fn: Deriving GitSignsAddLnVirtLnInLine from GitSignsAddLnInline                                                                                                                                                                                                                                                         
fn: Deriving GitSignsChangeVirtLnInLine from GitSignsChangeLnInline                                                                                                                                                                                                                                                     
fn: Deriving GitSignsDeleteVirtLnInLine from GitSignsDeleteLnInline                                                                                                                                                                                                                                                     
attach(1): Attaching (trigger=setup)                                                                                                                                                                                                                                                                                    
run_job: git --no-pager --literal-pathspecs config user.name                                                                                                                                                                                                                                                            
run_job: git --no-pager --literal-pathspecs rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD                                                                                                                                                                                                              
run_job: git --no-pager --literal-pathspecs rev-parse --short HEAD                                                                                                                                                                                                                                                      
run_job: git --no-pager --literal-pathspecs --git-dir=/home/fred/git/third_party/gitsigns.nvim/.git -c core.quotepath=off ls-files --stage --others --exclude-standard --eol /home/fred/git/third_party/gitsigns.nvim/README.md                                                                                         
watch_gitdir(1): Watching git dir                                                                                                                                                                                                                                                                                       
run_job: git --no-pager --literal-pathspecs --git-dir=/home/fred/git/third_party/gitsigns.nvim/.git show :0:README.md                                                                                                                                                                                                   
update(1): updates: 1, jobs: 6                                                                                                                                                                                                                                                                                          
run_job: git --no-pager --literal-pathspecs --git-dir=/home/fred/git/third_party/gitsigns.nvim/.git blame --contents - -L 144,+1 --line-porcelain /home/fred/git/third_party/gitsigns.nvim/README.md                                                                                                                    
run_job: git --no-pager --literal-pathspecs --git-dir=/home/fred/git/third_party/gitsigns.nvim/.git show -s --format=%B d03b7278b022c62eaf1bccc8011f9b45c1d4675a                                                                                                                                                        
run_job: git --no-pager --literal-pathspecs --git-dir=/home/fred/git/third_party/gitsigns.nvim/.git show 709455d2df50243f1d404f78c82d579caa778bfb:README.md                                                                                                                                                             
run_job: git --no-pager --literal-pathspecs --git-dir=/home/fred/git/third_party/gitsigns.nvim/.git show d03b7278b022c62eaf1bccc8011f9b45c1d4675a:README.md
@duboisf duboisf added the bug Something isn't working label Jun 15, 2022
@duboisf
Copy link
Author

duboisf commented Jun 15, 2022

Previewing hunks too:

image

@duboisf
Copy link
Author

duboisf commented Jun 15, 2022

oh! Forgot to say thanks for the great plugin! It's when something breaks that you truly appreciate their value 😅

lewis6991 added a commit that referenced this issue Sep 1, 2022
Previously the hunks in the preview windows used GitSigns*Ln highlights.
These are really intended for signs when linehl is enabled and
GitSignsDeleteLn is unset by default.

This change add the highlights GitSignsAddPreview and
GitSignsDeletePreview.

Fixes #582
@lewis6991 lewis6991 linked a pull request Sep 1, 2022 that will close this issue
1 task
lewis6991 added a commit that referenced this issue Sep 1, 2022
Previously the hunks in the preview windows used GitSigns*Ln highlights.
These are really intended for signs when linehl is enabled and
GitSignsDeleteLn is unset by default.

This change add the highlights GitSignsAddPreview and
GitSignsDeletePreview.

Fixes #582
duboisf added a commit to duboisf/.dotfiles that referenced this issue Sep 8, 2022
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