move to new tab

This commit is contained in:
theodus
2016-12-13 12:12:20 -05:00
parent 1d41634272
commit 4cb26d2e8e
2 changed files with 2 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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 {