aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/commands.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-10-17 08:02:20 +0100
committerStephen Blott2016-10-17 08:15:06 +0100
commitbc2f5e0f52179e915ed7a439fc6bfa03525156ee (patch)
treec01fdf33e456f0d5171c530c4da4754db8876a74 /background_scripts/commands.coffee
parentf01c01383d5826a028d4c5c2c43d7b5f18f2fef2 (diff)
downloadvimium-bc2f5e0f52179e915ed7a439fc6bfa03525156ee.tar.bz2
Better line parsing.
1. Explicitly remove comments. 2. A trailing backslash means the current line continues on the next line. E.g. a \ b \ c is a single line `a b c`. This helps alleviate the fact that configuration lines can be very long, whereas the *Custom key mappings* input is quite narrow. TODO: We should use the same line parser in the custom-search-engines input.
Diffstat (limited to 'background_scripts/commands.coffee')
-rw-r--r--background_scripts/commands.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee
index d12b704d..d24bdb05 100644
--- a/background_scripts/commands.coffee
+++ b/background_scripts/commands.coffee
@@ -61,7 +61,7 @@ Commands =
[key[0], @parseKeySequence(key[1..])...]
parseCustomKeyMappings: (customKeyMappings) ->
- for line in customKeyMappings.split "\n"
+ for line in BgUtils.parseLines customKeyMappings.split "\n"
unless line[0] == "\"" or line[0] == "#"
tokens = line.replace(/\s+$/, "").split /\s+/
switch tokens[0]