From 7e9a0fcdbd1c9399a2ebb891360c9ee9436b2752 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 24 May 2024 19:25:50 +0900 Subject: [PATCH] Change default --scroll-off to 3 --- CHANGELOG.md | 1 + man/man1/fzf.1 | 2 +- src/options.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b6ba13..18657808 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ CHANGELOG fzf --bind 'space:print(space pressed)+accept' ``` - This is similar to `--expect` but it allows you to queue multiple arbitrary strings +- Changed the default `--scroll-off` to 3, as we think it's a better default - [`NO_COLOR`](https://no-color.org/) environment variable is now respected. If the variable is set, fzf defaults to `--no-color` unless otherwise specified. 0.52.1 diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index 13fcc18b..33c67b2c 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -174,7 +174,7 @@ the query string is empty. .TP .BI "--scroll-off=" "LINES" Number of screen lines to keep above or below when scrolling to the top or to -the bottom (default: 0). +the bottom (default: 3). .TP .B "--no-hscroll" Disable horizontal scroll diff --git a/src/options.go b/src/options.go index 2d0112d8..202bfda9 100644 --- a/src/options.go +++ b/src/options.go @@ -534,7 +534,7 @@ func defaultOptions() *Options { KeepRight: false, Hscroll: true, HscrollOff: 10, - ScrollOff: 0, + ScrollOff: 3, FileWord: false, InfoStyle: infoDefault, Separator: nil,