aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-03-06 08:11:05 +0000
committerStephen Blott2016-03-17 14:28:06 +0000
commit34db989cce7e58364572bdf76554e965532e1ddd (patch)
tree6ca7d1bdf1a7d5cdfc42b76841eec4b53dd397a6
parent452b5bcffbf9ece8648c9e2d2d5649cbcb9193dc (diff)
downloadvimium-34db989cce7e58364572bdf76554e965532e1ddd.tar.bz2
Logging; consistent and concise normal-mode logging.
-rw-r--r--content_scripts/mode_key_handler.coffee6
1 files changed, 3 insertions, 3 deletions
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.