 
     parent.attach targetView  # Attach again.
 
+    @setActiveTabView targetIdeView.tabView
     @updateLayoutMap_ splitView, targetView
 
     # I'm not sure about the usage of private method. I had to...
     # Is it the best way for view resizing?
     targetView._windowDidResize()
+
+    if @rtm?.isReady and not quite
+      context =
+        ideViewHash : ideViewHash
+
+      @emitChange 'SplitViewWasMerged', context
 
     @doResize()
     @recalculateHandles()


    return  if not paneType or not paneHash

    @changeActiveTabView paneType  if not isFromLocalStorage and not @amIHost

    switch paneType
      when 'terminal' then @createTerminalPaneFromChange change, paneHash

      when 'NewPaneCreated'
        @mySnapshot.set paneHash, change  if paneHash

      when 'NewSplitViewCreated'
        @mySnapshot.set ideViewHash, change  if ideViewHash

      when 'SplitViewWasMerged'
        @mySnapshot.set ideViewHash, change  if ideViewHash

      when 'IDETabWasMoved'
        @mySnapshot.set ideViewHash, change  if ideViewHash

      when 'PaneRemoved'
        @mySnapshot.delete paneHash  if paneHash

