From 7feb42db344d0bdfedbdcaadae6ab03387318430 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sun, 8 May 2022 14:03:32 +0300 Subject: [PATCH] rename move commands to high/middle/low cc #824 --- doc.go | 14 +++++++------- docstring.go | 14 +++++++------- eval.go | 12 ++++++------ lf.1 | 14 +++++++------- nav.go | 6 +++--- opts.go | 6 +++--- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/doc.go b/doc.go index 3d3f758..fde848e 100644 --- a/doc.go +++ b/doc.go @@ -31,9 +31,9 @@ The following commands are provided by lf: jump-prev (default '[') top (default 'gg' and '') bottom (default 'G' and '') - hi-screen (default 'H') - mid-screen (default 'M') - lo-screen (default 'L') + high (default 'H') + middle (default 'M') + low (default 'L') toggle invert (default 'v') unselect (default 'u') @@ -298,11 +298,11 @@ Change the current working directory to the next/previous jumplist item. Move the current file selection to the top/bottom of the directory. - hi-screen (default 'H') - mid-screen (default 'M') - lo-screen (default 'L') + high (default 'H') + middle (default 'M') + low (default 'L') -Move the current file selection to the top/middle/bottom of the screen. +Move the current file selection to the high/middle/low of the screen. toggle diff --git a/docstring.go b/docstring.go index 2627f0a..e1df77a 100644 --- a/docstring.go +++ b/docstring.go @@ -35,9 +35,9 @@ The following commands are provided by lf: jump-prev (default '[') top (default 'gg' and '') bottom (default 'G' and '') - hi-screen (default 'H') - mid-screen (default 'M') - lo-screen (default 'L') + high (default 'H') + middle (default 'M') + low (default 'L') toggle invert (default 'v') unselect (default 'u') @@ -310,11 +310,11 @@ Change the current working directory to the next/previous jumplist item. Move the current file selection to the top/bottom of the directory. - hi-screen (default 'H') - mid-screen (default 'M') - lo-screen (default 'L') + high (default 'H') + middle (default 'M') + low (default 'L') -Move the current file selection to the top/middle/bottom of the screen. +Move the current file selection to the high/middle/low of the screen. toggle diff --git a/eval.go b/eval.go index 00ddb67..8c83206 100644 --- a/eval.go +++ b/eval.go @@ -963,27 +963,27 @@ func (e *callExpr) eval(app *app, args []string) { app.ui.loadFile(app.nav, true) app.ui.loadFileInfo(app.nav) } - case "hi-screen": + case "high": if !app.nav.init { return } - if app.nav.hiScreen() { + if app.nav.high() { app.ui.loadFile(app.nav, true) app.ui.loadFileInfo(app.nav) } - case "mid-screen": + case "middle": if !app.nav.init { return } - if app.nav.midScreen() { + if app.nav.middle() { app.ui.loadFile(app.nav, true) app.ui.loadFileInfo(app.nav) } - case "lo-screen": + case "low": if !app.nav.init { return } - if app.nav.loScreen() { + if app.nav.low() { app.ui.loadFile(app.nav, true) app.ui.loadFileInfo(app.nav) } diff --git a/lf.1 b/lf.1 index 487b8fd..58083cb 100644 --- a/lf.1 +++ b/lf.1 @@ -46,9 +46,9 @@ The following commands are provided by lf: jump-prev (default '[') top (default 'gg' and '') bottom (default 'G' and '') - hi-screen (default 'H') - mid-screen (default 'M') - lo-screen (default 'L') + high (default 'H') + middle (default 'M') + low (default 'L') toggle invert (default 'v') unselect (default 'u') @@ -347,12 +347,12 @@ Change the current working directory to the next/previous jumplist item. Move the current file selection to the top/bottom of the directory. .PP .EX - hi-screen (default 'H') - mid-screen (default 'M') - lo-screen (default 'L') + high (default 'H') + middle (default 'M') + low (default 'L') .EE .PP -Move the current file selection to the top/middle/bottom of the screen. +Move the current file selection to the high/middle/low of the screen. .PP .EX toggle diff --git a/nav.go b/nav.go index bb539d2..37fa540 100644 --- a/nav.go +++ b/nav.go @@ -943,7 +943,7 @@ func (nav *nav) bottom() bool { return old != dir.ind } -func (nav *nav) hiScreen() bool { +func (nav *nav) high() bool { dir := nav.currDir() old := dir.ind @@ -959,7 +959,7 @@ func (nav *nav) hiScreen() bool { return old != dir.ind } -func (nav *nav) midScreen() bool { +func (nav *nav) middle() bool { dir := nav.currDir() old := dir.ind @@ -973,7 +973,7 @@ func (nav *nav) midScreen() bool { return old != dir.ind } -func (nav *nav) loScreen() bool { +func (nav *nav) low() bool { dir := nav.currDir() old := dir.ind diff --git a/opts.go b/opts.go index 261a235..2909809 100644 --- a/opts.go +++ b/opts.go @@ -146,9 +146,9 @@ func init() { gOpts.keys[""] = &callExpr{"top", nil, 1} gOpts.keys["G"] = &callExpr{"bottom", nil, 1} gOpts.keys[""] = &callExpr{"bottom", nil, 1} - gOpts.keys["H"] = &callExpr{"hi-screen", nil, 1} - gOpts.keys["M"] = &callExpr{"mid-screen", nil, 1} - gOpts.keys["L"] = &callExpr{"lo-screen", nil, 1} + gOpts.keys["H"] = &callExpr{"high", nil, 1} + gOpts.keys["M"] = &callExpr{"middle", nil, 1} + gOpts.keys["L"] = &callExpr{"low", nil, 1} gOpts.keys["["] = &callExpr{"jump-prev", nil, 1} gOpts.keys["]"] = &callExpr{"jump-next", nil, 1} gOpts.keys[""] = &listExpr{[]expr{&callExpr{"toggle", nil, 1}, &callExpr{"down", nil, 1}}, 1}