aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
authorJez Ng2012-09-10 16:34:13 -0400
committerJez Ng2012-09-10 16:48:50 -0400
commit4314fb7b1ff2e8e68c2a56e6e8e004ead63c53a5 (patch)
tree9977fed464b1490010ee5eae2c9b19970079e756 /content_scripts/vimium_frontend.coffee
parent99afbfc0018d078959e7bf36352771d9e9206338 (diff)
downloadvimium-4314fb7b1ff2e8e68c2a56e6e8e004ead63c53a5.tar.bz2
Add option to make regex find the default. Closes #569.
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee8
1 files changed, 6 insertions, 2 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 22070084..2f30d47a 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -43,7 +43,8 @@ settings =
values: {}
loadedValues: 0
valuesToLoad: ["scrollStepSize", "linkHintCharacters", "filterLinkHints", "hideHud", "previousPatterns",
- "nextPatterns", "findModeRawQuery", "userDefinedLinkHintCss", "helpDialog_showAdvancedCommands"]
+ "nextPatterns", "findModeRawQuery", "regexFindMode", "userDefinedLinkHintCss",
+ "helpDialog_showAdvancedCommands"]
isLoaded: false
eventListeners: {}
@@ -572,13 +573,16 @@ updateFindModeQuery = ->
# the query can be treated differently (e.g. as a plain string versus regex depending on the presence of
# escape sequences. '\' is the escape character and needs to be escaped itself to be used as a normal
# character. here we grep for the relevant escape sequences.
- findModeQuery.isRegex = false
+ findModeQuery.isRegex = settings.get 'regexFindMode'
hasNoIgnoreCaseFlag = false
findModeQuery.parsedQuery = findModeQuery.rawQuery.replace /\\./g, (match) ->
switch (match)
when "\\r"
findModeQuery.isRegex = true
return ""
+ when "\\R"
+ findModeQuery.isRegex = false
+ return ""
when "\\I"
hasNoIgnoreCaseFlag = true
return ""