Added support for searching by regular expression
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
<p>
|
||||
<label>Find next <input id="find-next"/></label>
|
||||
<label>Find previous <input id="find-previous"/></label>
|
||||
<label>Use regex<input type="checkbox" id="regex"/></label>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
+2
-2
@@ -83,13 +83,13 @@ function createTerminal() {
|
||||
addDomListener(actionElements.findNext, 'keypress', function (e) {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
term.findNext(actionElements.findNext.value);
|
||||
term.findNext(actionElements.findNext.value, document.getElementById('regex').checked);
|
||||
}
|
||||
});
|
||||
addDomListener(actionElements.findPrevious, 'keypress', function (e) {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
term.findPrevious(actionElements.findPrevious.value);
|
||||
term.findPrevious(actionElements.findPrevious.value, document.getElementById('regex').checked);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user