Skip to content

Commit de0f978

Browse files
committed
Class context menu option
Remove alert logic from openInNewWindow method
1 parent e3705f6 commit de0f978

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/tab-bar-view.coffee

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ class TabBarView extends HTMLElement
150150
tab ?= @querySelector('.right-clicked')
151151
item = tab.item
152152
return unless item?
153-
unless ['TextEditor', 'TestView'].indexOf(item.constructor.name) > -1
154-
alert("'Open In New Window' only works for TextEditor tabs, for now.")
155-
return
156153
if typeof item.getURI is 'function'
157154
itemURI = item.getURI()
158155
else if typeof item.getPath is 'function'

lib/tab-view.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class TabView extends HTMLElement
77
if typeof @item.getPath is 'function'
88
@path = @item.getPath()
99

10+
if ['TextEditor', 'TestView'].indexOf(item.constructor.name) > -1
11+
@classList.add('texteditor')
1012
@classList.add('tab', 'sortable')
1113

1214
@itemTitle = document.createElement('div')

menus/tabs.cson

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ menu: [
2222
{label: 'Split Left', command: 'tabs:split-left'}
2323
{label: 'Split Right', command: 'tabs:split-right'}
2424

25+
]
26+
'.tab.texteditor': [
2527
{type: 'separator'}
26-
2728
{label: 'Open In New Window', command: 'tabs:open-in-new-window'}
29+
{type: 'separator'}
2830
]
2931
'.tab.pending-tab': [
3032
{label: 'Keep Pending Tab', command: 'tabs:keep-pending-tab'}

0 commit comments

Comments
 (0)