Merge pull request #493 from Theodus/tabs

Move to new tab when created
This commit is contained in:
Zachary Yedidia
2016-12-13 12:30:42 -05:00
committed by GitHub
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 {