parent
13fe1931cd
commit
e815adc6a6
@ -108,6 +108,9 @@ var (
|
||||
"wrapscan",
|
||||
"nowrapscan",
|
||||
"wrapscan!",
|
||||
"wrapscroll",
|
||||
"nowrapscroll",
|
||||
"wrapscroll!",
|
||||
"number",
|
||||
"nonumber",
|
||||
"number!",
|
||||
|
1
doc.go
1
doc.go
@ -111,6 +111,7 @@ The following options can be used to customize the behavior of lf:
|
||||
smartcase boolean (default on)
|
||||
smartdia boolean (default off)
|
||||
wrapscan boolean (default on)
|
||||
wrapscroll boolean (default off)
|
||||
number boolean (default off)
|
||||
relativenumber boolean (default off)
|
||||
findlen integer (default 1) (zero to prompt until single match)
|
||||
|
@ -114,6 +114,7 @@ The following options can be used to customize the behavior of lf:
|
||||
smartcase boolean (default on)
|
||||
smartdia boolean (default off)
|
||||
wrapscan boolean (default on)
|
||||
wrapscroll boolean (default off)
|
||||
number boolean (default off)
|
||||
relativenumber boolean (default off)
|
||||
findlen integer (default 1) (zero to prompt until single match)
|
||||
|
6
eval.go
6
eval.go
@ -143,6 +143,12 @@ func (e *setExpr) eval(app *app, args []string) {
|
||||
gOpts.wrapscan = false
|
||||
case "wrapscan!":
|
||||
gOpts.wrapscan = !gOpts.wrapscan
|
||||
case "wrapscroll":
|
||||
gOpts.wrapscroll = true
|
||||
case "nowrapscroll":
|
||||
gOpts.wrapscroll = false
|
||||
case "wrapscroll!":
|
||||
gOpts.wrapscroll = !gOpts.wrapscroll
|
||||
case "number":
|
||||
gOpts.number = true
|
||||
case "nonumber":
|
||||
|
1
lf.1
1
lf.1
@ -126,6 +126,7 @@ The following options can be used to customize the behavior of lf:
|
||||
smartcase boolean (default on)
|
||||
smartdia boolean (default off)
|
||||
wrapscan boolean (default on)
|
||||
wrapscroll boolean (default off)
|
||||
number boolean (default off)
|
||||
relativenumber boolean (default off)
|
||||
findlen integer (default 1) (zero to prompt until single match)
|
||||
|
6
nav.go
6
nav.go
@ -445,6 +445,9 @@ func (nav *nav) up(dist int) {
|
||||
dir := nav.currDir()
|
||||
|
||||
if dir.ind == 0 {
|
||||
if gOpts.wrapscroll {
|
||||
nav.bottom()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -462,6 +465,9 @@ func (nav *nav) down(dist int) {
|
||||
maxind := len(dir.files) - 1
|
||||
|
||||
if dir.ind >= maxind {
|
||||
if gOpts.wrapscroll {
|
||||
nav.top()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
2
opts.go
2
opts.go
@ -37,6 +37,7 @@ var gOpts struct {
|
||||
ignoredia bool
|
||||
smartdia bool
|
||||
wrapscan bool
|
||||
wrapscroll bool
|
||||
number bool
|
||||
relativenumber bool
|
||||
findlen int
|
||||
@ -72,6 +73,7 @@ func init() {
|
||||
gOpts.ignoredia = false
|
||||
gOpts.smartdia = false
|
||||
gOpts.wrapscan = true
|
||||
gOpts.wrapscroll = false
|
||||
gOpts.number = false
|
||||
gOpts.relativenumber = false
|
||||
gOpts.findlen = 1
|
||||
|
Loading…
Reference in New Issue
Block a user