'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],a):a(CodeMirror)})(function(a){function l(c,b,a,d){c.openDialog?c.openDialog(b,d):d(prompt(a,""))}var g=a.keyMap.pcDefault,h=a.keyMap.macDefault,k=a.Pos;a.commands.splitSelection=function(c){for(var b=[],a=c.getCursor("from"),d=c.getCursor("to"),e=a.line;e<=d.line;++e)b.push({anchor:e==a.line?a:k(e,0),head:e==d.line?d:k(e)});
c.setSelections(b,0)};a.commands.addNextOccurrenceToSelection=function(c){var b=c.getCursor("to"),b=c.getSearchCursor(c.getRange(c.getCursor("from"),b),b);b.findNext()&&c.addSelection(b.from(),b.to())};a.commands.selectMatchingPartsOfCurrentSelection=function(c){c.somethingSelected()&&l(c,'Match: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp)</span>',"Match:",function(b){var a=b.match(/^\/(.*)\/([a-z]*)$/);a&&(b=new RegExp(a[1],-1==a[2].indexOf("i")?
"":"i"));c.selectMatches(b)})};g["Shift-Ctrl-L"]=h["Shift-Cmd-L"]="splitSelection";g["Ctrl-D"]=h["Cmd-D"]="addNextOccurrenceToSelection";g["Alt-F"]=h["Alt-F"]="selectMatchingPartsOfCurrentSelection"});
(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],a):a(CodeMirror)})(function(a){function l(c,a,f,d){c.openDialog?c.openDialog(a,d):d(prompt(f,""))}var g=a.keyMap.pcDefault,h=a.keyMap.macDefault,k=a.Pos;a.commands.splitSelection=function(a){for(var b=[],f=a.getCursor("from"),d=a.getCursor("to"),e=f.line;e<=d.line;++e)b.push({anchor:e==f.line?f:k(e,0),head:e==d.line?d:k(e)});a.setSelections(b,
0)};a.commands.addNextOccurrenceToSelection=function(a){var b=a.getCursor("to"),b=a.getSearchCursor(a.getRange(a.getCursor("from"),b),b);b.findNext()&&a.addSelection(b.from(),b.to())};a.commands.selectMatchingPartsOfCurrentSelection=function(a){a.somethingSelected()&&l(a,'Match: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp)</span>',"Match:",function(b){var f=b.match(/^\/(.*)\/([a-z]*)$/);f&&(b=new RegExp(f[1],-1==f[2].indexOf("i")?"":"i"));a.selectMatches(b)})};
g["Shift-Ctrl-L"]=h["Shift-Cmd-L"]="splitSelection";g["Ctrl-D"]=h["Cmd-D"]="addNextOccurrenceToSelection";g["Alt-F"]=h["Alt-F"]="selectMatchingPartsOfCurrentSelection"});
