less icon indicating copy to clipboard operation
less copied to clipboard

Regression: text is shown at bottom of screen instead of top

Open jlombera opened this issue 9 months ago • 13 comments

less shows text at bottom of screen instead of top when text is less than one screen in size. This is a regression from previous, historical behavior.

System info

  • OS: Debian GNU/Linux Trixie (testing) x86_64 (kernel v6.7)
  • less version: 649 (as shipped by Debian)
  • TERM: xterm, xterm-256color, tmux-256color (tested only with these TERMS)
  • Terminal emulator: gnome-terminal, xterm

How to reproduce

$ clear ; echo hello | less
  • Current behavior: text appears at bottom of screen
  • Expected behavior: text should appear at top of screen

Diagnostics

Bisect showed regression was introduced by commit 98782c194f16 ("Move cursor to lower left at startup if we are using an alt screen."). Still reproducible in current HEAD (v654; fabdc1550680). Reverting that commit fixes the problem.

jlombera avatar May 17 '24 05:05 jlombera