From 34db989cce7e58364572bdf76554e965532e1ddd Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 6 Mar 2016 08:11:05 +0000 Subject: Logging; consistent and concise normal-mode logging. --- content_scripts/mode_key_handler.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/mode_key_handler.coffee b/content_scripts/mode_key_handler.coffee index d06bddb5..bafdfd56 100644 --- a/content_scripts/mode_key_handler.coffee +++ b/content_scripts/mode_key_handler.coffee @@ -20,7 +20,7 @@ class KeyHandlerMode extends Mode # Reset the key state, optionally retaining the count provided. reset: (@countPrefix = 0) -> - bgLog "Clearing key state, set count=#{@countPrefix}." + bgLog "Clearing key state: #{@countPrefix} (#{@name})" @keyState = [@keyMapping] constructor: (options) -> @@ -88,7 +88,7 @@ class KeyHandlerMode extends Mode @countPrefix == 0 and @keyState.length == 1 and keyChar in (@passKeys ? "") handleKeyChar: (keyChar) -> - bgLog "Handling key #{keyChar}, mode=#{@name}." + bgLog "Handle key #{keyChar} (#{@name})" # A count prefix applies only so long a keyChar is mapped in @keyState[0]; e.g. 7gj should be 1j. @countPrefix = 0 unless keyChar of @keyState[0] # Advance the key state. The new key state is the current mappings of keyChar, plus @keyMapping. @@ -96,7 +96,7 @@ class KeyHandlerMode extends Mode command = (mapping for mapping in @keyState when "command" of mapping)[0] if command count = if 0 < @countPrefix then @countPrefix else 1 - bgLog "Calling mode=#{@name}, command=#{command.command}, count=#{count}." + bgLog "Call #{command.command}[#{count}] (#{@mode})" @reset() @commandHandler {command, count} false # Suppress event. -- cgit v1.2.3