Fix tilde expansion when using setlocal (#1596)
This commit is contained in:
1 parent
d654f09885
commit
ac32468629
1 file changed
+5
-5
@@ -438,8 +438,8 @@ func (e *setExpr) eval(app *app, args []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *setLocalExpr) eval(app *app, args []string) {
|
func (e *setLocalExpr) eval(app *app, args []string) {
|
||||||
path := replaceTilde(e.path)
|
e.path = replaceTilde(e.path)
|
||||||
if !filepath.IsAbs(path) {
|
if !filepath.IsAbs(e.path) {
|
||||||
app.ui.echoerr("setlocal: path should be absolute")
|
app.ui.echoerr("setlocal: path should be absolute")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -476,7 +476,7 @@ func (e *setLocalExpr) eval(app *app, args []string) {
|
|||||||
}
|
}
|
||||||
case "info":
|
case "info":
|
||||||
if e.val == "" {
|
if e.val == "" {
|
||||||
gLocalOpts.infos[path] = nil
|
gLocalOpts.infos[e.path] = nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
toks := strings.Split(e.val, ":")
|
toks := strings.Split(e.val, ":")
|
||||||
@@ -488,14 +488,14 @@ func (e *setLocalExpr) eval(app *app, args []string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gLocalOpts.infos[path] = toks
|
gLocalOpts.infos[e.path] = toks
|
||||||
case "sortby":
|
case "sortby":
|
||||||
method := sortMethod(e.val)
|
method := sortMethod(e.val)
|
||||||
if !isValidSortMethod(method) {
|
if !isValidSortMethod(method) {
|
||||||
app.ui.echoerr(invalidSortErrorMessage)
|
app.ui.echoerr(invalidSortErrorMessage)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
gLocalOpts.sortbys[path] = method
|
gLocalOpts.sortbys[e.path] = method
|
||||||
app.nav.sort()
|
app.nav.sort()
|
||||||
app.ui.sort()
|
app.ui.sort()
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in new issue
Block a user