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
+1
-1
@@ -224,7 +224,7 @@ func matchExec(s string) (matches []string, longest string) {
|
||||
}
|
||||
|
||||
func matchFile(s string) (matches []string, longest string) {
|
||||
dir := strings.Replace(s, "~", gUser.HomeDir, -1)
|
||||
dir := replaceTilde(s)
|
||||
|
||||
if !filepath.IsAbs(dir) {
|
||||
wd, err := os.Getwd()
|
||||
|
||||
Reference in new issue
Block a user