Skip to content

scrolloff on opening a file with copen #161

@mostafaqanbaryan

Description

@mostafaqanbaryan

Neovim version (nvim -v | head -n1)

NVIM v0.12.0-dev-248+g317a897c46

Operating system/version

Arch

How to reproduce the issue

  1. lua vim.opt.scrolloff = 7.
  2. :call setqflist(map(['/path/to/file1', '/path/to/file2'], {_, val -> {'filename': val}})).
  3. copen and select the first file.
  4. now in the first file, copen and select the second file.
  5. now go back to the first file with :bn or <C-^>.
  6. lua vim.print(vim.opt.scrolloff._value) should be zero.

Expected behavior

vim.print(vim.opt.scrolloff._value) in the first file should be 7.

Actual behavior

vim.print(vim.opt.scrolloff._value) in the first file is zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions