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:
gotroyb127 authored and GitHub committed 2020-06-07 20:53:25 +03:00
1 parent c49140ab36
commit 41e0bb32cd
5 files changed
+25 -10

No files matched your search

+7
View File
@@ -207,6 +207,13 @@ func max(a, b int) int {
return b
}
func replaceTilde(s string) string {
if strings.HasPrefix(s, "~") {
s = strings.Replace(s, "~", gUser.HomeDir, 1)
}
return s
}
// We don't need no generic code
// We don't need no type control
// No dark templates in compiler