From 4db1a63b75833679ef197ed1c2e64db69976913d Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Wed, 30 Mar 2022 12:58:38 +0300 Subject: [PATCH] rename scrollup/down to scroll-up/down cc #764 --- complete.go | 4 ++-- doc.go | 10 +++++----- docstring.go | 12 ++++++------ eval.go | 8 ++++---- lf.1 | 10 +++++----- nav.go | 4 ++-- opts.go | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/complete.go b/complete.go index 2ca78adf..2c977cd2 100644 --- a/complete.go +++ b/complete.go @@ -17,11 +17,11 @@ var ( "up", "half-up", "page-up", - "scrollup", + "scroll-up", "down", "half-down", "page-down", - "scrolldown", + "scroll-down", "updir", "open", "quit", diff --git a/doc.go b/doc.go index a41c7779..0056f574 100644 --- a/doc.go +++ b/doc.go @@ -20,11 +20,11 @@ The following commands are provided by lf: up (default 'k' and '') half-up (default '') page-up (default '' and '') - scrollup (default '') + scroll-up (default '') down (default 'j' and '') half-down (default '') page-down (default '' and '') - scrolldown (default '') + scroll-down (default '') updir (default 'h' and '') open (default 'l' and '') top (default 'gg' and '') @@ -264,13 +264,13 @@ Quit lf and return to the shell. up (default 'k' and '') half-up (default '') page-up (default '' and '') - scrollup (default '') + scroll-up (default '') down (default 'j' and '') half-down (default '') page-down (default '' and '') - scrolldown (default '') + scroll-down (default '') -Move the current file selection upwards/downwards by one/half a page/full page. +Move/scroll the current file selection upwards/downwards by one/half a page/full page. updir (default 'h' and '') diff --git a/docstring.go b/docstring.go index eea3dbe3..e6a3f8cb 100644 --- a/docstring.go +++ b/docstring.go @@ -25,11 +25,11 @@ The following commands are provided by lf: up (default 'k' and '') half-up (default '') page-up (default '' and '') - scrollup (default '') + scroll-up (default '') down (default 'j' and '') half-down (default '') page-down (default '' and '') - scrolldown (default '') + scroll-down (default '') updir (default 'h' and '') open (default 'l' and '') top (default 'gg' and '') @@ -273,14 +273,14 @@ Quit lf and return to the shell. up (default 'k' and '') half-up (default '') page-up (default '' and '') - scrollup (default '') + scroll-up (default '') down (default 'j' and '') half-down (default '') page-down (default '' and '') - scrolldown (default '') + scroll-down (default '') -Move the current file selection upwards/downwards by one/half a page/full -page. +Move/scroll the current file selection upwards/downwards by one/half a +page/full page. updir (default 'h' and '') diff --git a/eval.go b/eval.go index 7248220b..54f2dcb1 100644 --- a/eval.go +++ b/eval.go @@ -816,11 +816,11 @@ func (e *callExpr) eval(app *app, args []string) { app.ui.loadFile(app.nav, true) app.ui.loadFileInfo(app.nav) } - case "scrollup": + case "scroll-up": if !app.nav.init { return } - if app.nav.scrollup(e.count) { + if app.nav.scrollUp(e.count) { app.ui.loadFile(app.nav, true) app.ui.loadFileInfo(app.nav) } @@ -848,11 +848,11 @@ func (e *callExpr) eval(app *app, args []string) { app.ui.loadFile(app.nav, true) app.ui.loadFileInfo(app.nav) } - case "scrolldown": + case "scroll-down": if !app.nav.init { return } - if app.nav.scrolldown(e.count) { + if app.nav.scrollDown(e.count) { app.ui.loadFile(app.nav, true) app.ui.loadFileInfo(app.nav) } diff --git a/lf.1 b/lf.1 index 3f720ce7..8b702e5c 100644 --- a/lf.1 +++ b/lf.1 @@ -35,11 +35,11 @@ The following commands are provided by lf: up (default 'k' and '') half-up (default '') page-up (default '' and '') - scrollup (default '') + scroll-up (default '') down (default 'j' and '') half-down (default '') page-down (default '' and '') - scrolldown (default '') + scroll-down (default '') updir (default 'h' and '') open (default 'l' and '') top (default 'gg' and '') @@ -304,14 +304,14 @@ Quit lf and return to the shell. up (default 'k' and '') half-up (default '') page-up (default '' and '') - scrollup (default '') + scroll-up (default '') down (default 'j' and '') half-down (default '') page-down (default '' and '') - scrolldown (default '') + scroll-down (default '') .EE .PP -Move the current file selection upwards/downwards by one/half a page/full page. +Move/scroll the current file selection upwards/downwards by one/half a page/full page. .PP .EX updir (default 'h' and '') diff --git a/nav.go b/nav.go index b675879e..52a1e407 100644 --- a/nav.go +++ b/nav.go @@ -828,7 +828,7 @@ func (nav *nav) down(dist int) bool { return old != dir.ind } -func (nav *nav) scrollup(dist int) bool { +func (nav *nav) scrollUp(dist int) bool { dir := nav.currDir() // when reached top do nothing @@ -857,7 +857,7 @@ func (nav *nav) scrollup(dist int) bool { return old != dir.ind } -func (nav *nav) scrolldown(dist int) bool { +func (nav *nav) scrollDown(dist int) bool { dir := nav.currDir() maxind := len(dir.files) - 1 diff --git a/opts.go b/opts.go index 5c79cd78..dae3983c 100644 --- a/opts.go +++ b/opts.go @@ -130,13 +130,13 @@ func init() { gOpts.keys[""] = &callExpr{"half-up", nil, 1} gOpts.keys[""] = &callExpr{"page-up", nil, 1} gOpts.keys[""] = &callExpr{"page-up", nil, 1} - gOpts.keys[""] = &callExpr{"scrollup", nil, 1} + gOpts.keys[""] = &callExpr{"scroll-up", nil, 1} gOpts.keys["j"] = &callExpr{"down", nil, 1} gOpts.keys[""] = &callExpr{"down", nil, 1} gOpts.keys[""] = &callExpr{"half-down", nil, 1} gOpts.keys[""] = &callExpr{"page-down", nil, 1} gOpts.keys[""] = &callExpr{"page-down", nil, 1} - gOpts.keys[""] = &callExpr{"scrolldown", nil, 1} + gOpts.keys[""] = &callExpr{"scroll-down", nil, 1} gOpts.keys["h"] = &callExpr{"updir", nil, 1} gOpts.keys[""] = &callExpr{"updir", nil, 1} gOpts.keys["l"] = &callExpr{"open", nil, 1}