Skip to content

With nosplitscroll the last focused window is scrolled when a new split is opened in the exit_cb function of a terminal popup #11160

@bfrg

Description

@bfrg

Steps to reproduce

  1. Run vim --clean -S test.vim, with
vim9script
set splitbelow
set nosplitscroll
setline(1, range(100))
normal! G

const ptybuf: number = term_start(&shell, {
    hidden: true,
    exit_cb: (_, _) => {
        close
        help
    }
})

popup_create(ptybuf, {border: []})
  1. Close the shell by typing exit in the terminal popup (or alternatively, depending on the shell, press <C-d>).
  2. Result: The help window is opened and the popup is closed. But the previously focused window has been scrolled.

Expected behaviour

No scrolling when a window is split in a terminal callback function.

Version of Vim

9.0.500

Environment

Linux

Logs and stack traces

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions