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

Display diff buffers scrolled down to the first change #539

Open
ruicsh opened this issue Nov 1, 2024 · 0 comments
Open

Display diff buffers scrolled down to the first change #539

ruicsh opened this issue Nov 1, 2024 · 0 comments

Comments

@ruicsh
Copy link

ruicsh commented Nov 1, 2024

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 ruicsh changed the title Display diff buffers with cursor on the first change Display diff buffers scrolled down to the first change Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant