diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-08-17 09:58:16 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2023-08-21 09:03:45 +0200 |
commit | b2d629b50a69d5286f5e496eef5aca0c73ff99bb (patch) | |
tree | 0c601a2bb92ca05ce2f41f8143824c51703a1052 /docs/Config.md | |
parent | 125d4fa9dc31931d2ff752316449b0a3a7a6d8df (diff) |
Add scrollOffEnabled config
Diffstat (limited to 'docs/Config.md')
-rw-r--r-- | docs/Config.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/Config.md b/docs/Config.md index da68e2a01..4bffee29d 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -35,7 +35,8 @@ gui: windowSize: 'normal' # one of 'normal' | 'half' | 'full' default is 'normal' scrollHeight: 2 # how many lines you scroll by scrollPastBottom: true # enable scrolling past the bottom - scrollOffMargin: 2 # how many lines to keep before/after the cursor when it reaches the top/bottom of the view + scrollOffMargin: 2 # how many lines to keep before/after the cursor when it reaches the top/bottom of the view; see 'Scroll-off Margin' section below + scrollOffBehavior: 'margin' # one of 'margin' | 'jump'; see 'Scroll-off Margin' section below sidePanelWidth: 0.3333 # number from 0 to 1 expandFocusedSidePanel: false mainPanelSplitMode: 'flexible' # one of 'horizontal' | 'flexible' | 'vertical' @@ -349,6 +350,14 @@ or LG_CONFIG_FILE="$HOME/.base_lg_conf,$HOME/.light_theme_lg_conf" lazygit ``` +## Scroll-off Margin + +When the selected line gets close to the bottom of the window and you hit down-arrow, there's a feature called "scroll-off margin" that lets the view scroll a little earlier so that you can see a bit of what's coming in the direction that you are moving. This is controlled by the `gui.scrollOffMargin` setting (default: 2), so it keeps 2 lines below the selection visible as you scroll down. It can be set to 0 to scroll only when the selection reaches the bottom of the window. + +That's the behavior when `gui.scrollOffBehavior` is set to "margin" (the default). If you set `gui.scrollOffBehavior` to "jump", then upon reaching the last line of a view and hitting down-arrow the view will scroll by half a page so that the selection ends up in the middle of the view. This may feel a little jarring because the cursor jumps around when continuously moving down, but it has the advantage that the view doesn't scroll as often. + +This setting applies both to all list views (e.g. commits and branches etc), and to the staging view. + ## Color Attributes For color attributes you can choose an array of attributes (with max one color attribute) |