mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
🚱 Call off on active item when it is removed
This commit is contained in:
parent
6baaf404af
commit
e28ef3a76c
@ -281,6 +281,7 @@ class Pane extends View
|
||||
# Public: Just remove the item at the given index.
|
||||
removeItemAtIndex: (index, options={}) ->
|
||||
item = @items[index]
|
||||
@activeItem.off? 'title-changed', @activeItemTitleChanged if item is @activeItem
|
||||
@showNextItem() if item is @activeItem and @items.length > 1
|
||||
_.remove(@items, item)
|
||||
@state.get('items').remove(index) if options.updateState ? true
|
||||
|
Loading…
Reference in New Issue
Block a user