Skip to content

evil-scroll-up and evil-scroll-down do not work correctly when end of buffer is visible #1497

Open
@hugojry

Description

@hugojry

Issue type

Bug report

Environment

Emacs version: 28.0.50
Operating System: Ubuntu 20.4
Evil version: 1.14.0
Evil installation type: MELPA, MELPA stable, Quelpa, El-Get, manual -->
Graphical/Terminal: Graphical
Tested in a make emacs session (see CONTRIBUTING.md): Yes

Reproduction steps

  • Start Emacs with make emacs
  • Open file with enough lines to fill a whole window
  • Using C-e, scroll down so only the last line of the buffer is visible
  • M-x evil-scroll-up

Expected behavior

The window should be half filled with lines from the buffer.

Actual behavior

The window doesn't scroll at all.

Further notes

This is because evil-scroll-up (and evil-scroll-down) use evil-visible-window-height which reports incorrect values for window height when the window is positioned over the end of the buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions