diff options
Diffstat (limited to 'content_scripts/mode_insert.coffee')
| -rw-r--r-- | content_scripts/mode_insert.coffee | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/content_scripts/mode_insert.coffee b/content_scripts/mode_insert.coffee index 90162d5a..7ca2e561 100644 --- a/content_scripts/mode_insert.coffee +++ b/content_scripts/mode_insert.coffee @@ -24,6 +24,7 @@ class InsertMode extends Mode defaults = name: "insert" + indicator: if @permanent then null else "Insert mode" keypress: handleKeyEvent keyup: handleKeyEvent keydown: handleKeyEvent @@ -68,18 +69,13 @@ class InsertMode extends Mode activateOnElement: (element) -> @log "#{@id}: activating (permanent)" if @debug and @permanent @insertModeLock = element - Mode.updateBadge() exit: (_, target) -> if (target and target == @insertModeLock) or @global or target == undefined @log "#{@id}: deactivating (permanent)" if @debug and @permanent and @insertModeLock @insertModeLock = null # Exit, but only if this isn't the permanently-installed instance. - if @permanent then Mode.updateBadge() else super() - - updateBadge: (badge) -> - badge.badge ||= @badge if @badge - badge.badge ||= "I" if @isActive badge + super() unless @permanent # Static stuff. This allows PostFindMode to suppress the permanently-installed InsertMode instance. @suppressedEvent: null |
