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

Problem with colour of signs #939

Closed
simonsmith opened this issue Jan 26, 2024 · 2 comments · Fixed by #940 or #1002
Closed

Problem with colour of signs #939

simonsmith opened this issue Jan 26, 2024 · 2 comments · Fixed by #940 or #1002
Labels
bug Something isn't working

Comments

@simonsmith
Copy link

simonsmith commented Jan 26, 2024

Description

Hey,

When updating to the latest version of the plugin I see rendering issues with the colours of the signs in the gutter.

I've located this commit as the culprit. Checking out the commit before resolves the issue

Neovim version

0.9.5

Operating system and version

macOS Ventura

Expected behavior

It should look like this:

image

Actual behavior

It renders like this:

image

Minimal config

require('gitsigns').setup({
  signs = {
    add          = { text = '' },
    change       = { text = '' },
    delete       = { text = '' },
    topdelete    = { text = '' },
    changedelete = { text = '' },
    untracked    = { text = '' },
  },
  on_attach = function(bufnr)
    local gs = package.loaded.gitsigns

    local function map(mode, l, r, opts)
      opts = opts or {}
      opts.buffer = bufnr
      vim.keymap.set(mode, l, r, opts)
    end

    -- Navigation
    map('n', ']c', function()
      if vim.wo.diff then return ']c' end
      vim.schedule(function() gs.next_hunk() end)
      return '<Ignore>'
    end, {expr=true})

    map('n', '[c', function()
      if vim.wo.diff then return '[c' end
      vim.schedule(function() gs.prev_hunk() end)
      return '<Ignore>'
    end, {expr=true})
  end
})

Steps to reproduce

Make a change to any version controlled file

Gitsigns debug messages

No response

@simonsmith simonsmith added the bug Something isn't working label Jan 26, 2024
@lewis6991
Copy link
Owner

This change is due to changes in Nvim v0.10. I'll add a guard for the old behaviour.

lewis6991 added a commit that referenced this issue Jan 26, 2024
lewis6991 added a commit that referenced this issue Jan 26, 2024
lewis6991 added a commit that referenced this issue Jan 26, 2024
@simonsmith
Copy link
Author

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment