Skip to content

With 'nosplitscroll' the current window is unnecessarily scrolled after hitting Enter in the search prompt #11158

@bfrg

Description

@bfrg

Steps to reproduce

  1. Open vim's main.c file with vim --clean -c 'set nosplitscroll hlsearch incsearch' main.c
  2. While the cursor is located in the first line, hit / and type printf. Vim will automatically scroll to the first occurrence of printf.
  3. Hit <CR> to confirm the search result.
  4. Result: the screen flickers very quickly because of an unnecessary scrolling.

This occurs only when splitscroll is disabled and when the window needs to be scrolled to show the first occurrence of the search pattern.

Expected behaviour

No screen flicker when hitting <CR> in the search prompt.

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