diffview.nvim icon indicating copy to clipboard operation
diffview.nvim copied to clipboard

Display diff buffers scrolled down to the first change

Open ruicsh opened this issue 1 year ago • 0 comments

On DiffviewFiles, I'm trying to display buffer A and B scrolled down to the first change on the file.

I have folding disabled. I'm trying to use this hook:

hooks = {
  diff_buf_read = function(buffnr)
    vim.api.nvim_buf_call(buffnr, function()
      vim.cmd("normal! gg]czz")
    end)
  end
}

but it isn't working, what am I doing wrong?

ruicsh avatar Nov 01 '24 18:11 ruicsh