diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-09-18 09:42:24 +0900 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-09-18 09:42:24 +0900 |
| commit | 37589fb7b42446dc2998365d3bc07e1fa2f83159 (patch) | |
| tree | cc432faa36d31503eb97d11fdcd02070fddde349 /src | |
| parent | 902724e5586a993bf21232fcecf9d1561207a78c (diff) | |
| parent | e52003049c5cf2ea7285b66aab5dcdf5b2498d69 (diff) | |
Merge remote-tracking branch 'Delapouite/scroll-count'
Diffstat (limited to 'src')
| -rw-r--r-- | src/normal.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/normal.cc b/src/normal.cc index c7b37811..2a4639d3 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -1222,10 +1222,11 @@ void select_object(Context& context, NormalParams params) } template<Direction direction, bool half = false> -void scroll(Context& context, NormalParams) +void scroll(Context& context, NormalParams params) { Window& window = context.window(); - const LineCount offset = (window.dimensions().line - 2) / (half ? 2 : 1); + const int count = params.count ? params.count : 1; + const LineCount offset = (window.dimensions().line - 2) / (half ? 2 : 1) * count; scroll_window(context, direction == Direction::Forward ? offset : -offset); } |
