implement gdefault option
This commit is contained in:
parent
2fa4584eb4
commit
964813a0b0
1 changed files with 4 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ trySave = (func) ->
|
|||
|
||||
try
|
||||
response = func()
|
||||
|
||||
|
||||
if response instanceof Promise
|
||||
response.then ->
|
||||
deferred.resolve()
|
||||
|
|
@ -361,6 +361,9 @@ class Ex
|
|||
try
|
||||
flagsObj = {}
|
||||
flags.split('').forEach((flag) -> flagsObj[flag] = true)
|
||||
# gdefault option
|
||||
if atom.config.get('ex-mode.gdefault')
|
||||
flagsObj.g = !flagsObj.g
|
||||
patternRE = getSearchTerm(pattern, flagsObj)
|
||||
catch e
|
||||
if e.message.indexOf('Invalid flags supplied to RegExp constructor') is 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue