fix tilde expansion and numbering (#373)
* Fixed issue #346 and changed the format of numbers when both relativenumber and number are set. * Fixed issue #349 (incorrect replacement of '~' with user's home direcotry). * Changed where appropriate so that tilde replacements happens correctly. * Added a function to replace tilde with user's home directory, only when it should. * Renamed ReplaceTilde to replaceTilde so that it won't get exported and removed some ';' at the end of some lines.
This commit is contained in:
1 parent
c49140ab36
commit
41e0bb32cd
5 files changed
+25
-10
No files matched your search
@@ -232,7 +232,7 @@ func (e *setExpr) eval(app *app, args []string) {
|
||||
case "ifs":
|
||||
gOpts.ifs = e.val
|
||||
case "previewer":
|
||||
gOpts.previewer = strings.Replace(e.val, "~", gUser.HomeDir, -1)
|
||||
gOpts.previewer = replaceTilde(e.val)
|
||||
case "promptfmt":
|
||||
gOpts.promptfmt = e.val
|
||||
case "shell":
|
||||
@@ -969,7 +969,7 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
app.ui.echoerr("source: requires an argument")
|
||||
return
|
||||
}
|
||||
app.readFile(strings.Replace(e.args[0], "~", gUser.HomeDir, -1))
|
||||
app.readFile(replaceTilde(e.args[0]))
|
||||
app.ui.loadFileInfo(app.nav)
|
||||
case "push":
|
||||
if len(e.args) != 1 {
|
||||
|
||||
Reference in new issue
Block a user