Skip to content

Commit ac32468

Browse files
authored
Fix tilde expansion when using setlocal (#1596)
1 parent d654f09 commit ac32468

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

eval.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ func (e *setExpr) eval(app *app, args []string) {
438438
}
439439

440440
func (e *setLocalExpr) eval(app *app, args []string) {
441-
path := replaceTilde(e.path)
442-
if !filepath.IsAbs(path) {
441+
e.path = replaceTilde(e.path)
442+
if !filepath.IsAbs(e.path) {
443443
app.ui.echoerr("setlocal: path should be absolute")
444444
return
445445
}
@@ -476,7 +476,7 @@ func (e *setLocalExpr) eval(app *app, args []string) {
476476
}
477477
case "info":
478478
if e.val == "" {
479-
gLocalOpts.infos[path] = nil
479+
gLocalOpts.infos[e.path] = nil
480480
return
481481
}
482482
toks := strings.Split(e.val, ":")
@@ -488,14 +488,14 @@ func (e *setLocalExpr) eval(app *app, args []string) {
488488
return
489489
}
490490
}
491-
gLocalOpts.infos[path] = toks
491+
gLocalOpts.infos[e.path] = toks
492492
case "sortby":
493493
method := sortMethod(e.val)
494494
if !isValidSortMethod(method) {
495495
app.ui.echoerr(invalidSortErrorMessage)
496496
return
497497
}
498-
gLocalOpts.sortbys[path] = method
498+
gLocalOpts.sortbys[e.path] = method
499499
app.nav.sort()
500500
app.ui.sort()
501501
default:

0 commit comments

Comments
 (0)