From 4cb26d2e8e0c2a24572edebc67de01477290d53c Mon Sep 17 00:00:00 2001 From: theodus Date: Tue, 13 Dec 2016 12:12:20 -0500 Subject: [PATCH] move to new tab --- cmd/micro/actions.go | 2 +- cmd/micro/command.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/micro/actions.go b/cmd/micro/actions.go index 8b31b0ab..28bb5d4e 100644 --- a/cmd/micro/actions.go +++ b/cmd/micro/actions.go @@ -1472,7 +1472,7 @@ func (v *View) AddTab(usePlugin bool) bool { tab := NewTabFromView(NewView(NewBuffer(strings.NewReader(""), ""))) tab.SetNum(len(tabs)) tabs = append(tabs, tab) - curTab++ + curTab = len(tabs) - 1 if len(tabs) == 2 { for _, t := range tabs { for _, v := range t.views { diff --git a/cmd/micro/command.go b/cmd/micro/command.go index 203212be..0c582e20 100644 --- a/cmd/micro/command.go +++ b/cmd/micro/command.go @@ -333,7 +333,7 @@ func NewTab(args []string) { tab := NewTabFromView(NewView(NewBuffer(file, filename))) tab.SetNum(len(tabs)) tabs = append(tabs, tab) - curTab++ + curTab = len(tabs) - 1 if len(tabs) == 2 { for _, t := range tabs { for _, v := range t.views {