File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,25 @@ class FocusHistory {
45
45
46
46
export function activate ( ink ) {
47
47
subs = new CompositeDisposable ( )
48
-
49
- subs . add ( atom . workspace . onDidStopChangingActivePaneItem ( ( item ) => {
50
- if ( item instanceof TextEditor ) {
51
- lastEditor = item
52
- } else if ( item instanceof ink . InkTerminal ) {
53
- lastTerminal = item
54
- }
55
- } ) )
48
+
49
+ subs . add (
50
+ atom . workspace . onDidStopChangingActivePaneItem ( item => {
51
+ if ( item instanceof TextEditor ) {
52
+ lastEditor = item
53
+ } else if ( item instanceof ink . InkTerminal ) {
54
+ lastTerminal = item
55
+ }
56
+ } ,
57
+ atom . packages . onDidActivateInitialPackages ( ( ) => {
58
+ lastEditor = atom . workspace . getActiveTextEditor ( )
59
+ atom . workspace . getPanes ( ) . forEach ( pane => {
60
+ const item = pane . getActiveItem ( )
61
+ if ( item instanceof ink . InkTerminal ) {
62
+ lastTerminal = item
63
+ }
64
+ } )
65
+ } )
66
+ ) )
56
67
57
68
const history = new FocusHistory ( 30 )
58
69
ink . Opener . onDidOpen ( ( { newLocation, oldLocation} ) => {
You can’t perform that action at this time.
0 commit comments