Move incomplete colorschemes and improve cd

The default colorschemes should ideally use 256 colors instead
of just 16 colors. The `simple` colorscheme should cover most
16 color use cases. I went through the colorschemes and put the themes
that didn't look good or looked incomplete in an in_progress directory.

This commit also improves the `cd` command behavior when using an
unnamed buffer.
This commit is contained in:
Zachary Yedidia
2017-11-23 15:57:17 -05:00
parent 71ee185b80
commit 36d72c4cab
19 changed files with 273 additions and 395 deletions

View File

@@ -235,10 +235,18 @@ func TabSwitch(args []string) {
func Cd(args []string) {
if len(args) > 0 {
path := ReplaceHome(args[0])
os.Chdir(path)
err := os.Chdir(path)
if err != nil {
messenger.Error("Error with cd: ", err)
return
}
wd, _ := os.Getwd()
for _, tab := range tabs {
for _, view := range tab.views {
wd, _ := os.Getwd()
if len(view.Buf.name) == 0 {
continue
}
view.Buf.Path, _ = MakeRelative(view.Buf.AbsPath, wd)
if p, _ := filepath.Abs(view.Buf.Path); !strings.Contains(p, wd) {
view.Buf.Path = view.Buf.AbsPath