use decoration width, find all and select next

This commit is contained in:
meganrogge
2022-03-11 12:01:19 -05:00
parent 96574425c7
commit fa4479c797
5 changed files with 192 additions and 49 deletions
+5
View File
@@ -92,6 +92,7 @@ const addons: { [T in AddonType]: IDemoAddon<T>} = {
const terminalContainer = document.getElementById('terminal-container');
const actionElements = {
find: <HTMLInputElement>document.querySelector('#find'),
findNext: <HTMLInputElement>document.querySelector('#find-next'),
findPrevious: <HTMLInputElement>document.querySelector('#find-previous')
};
@@ -199,6 +200,10 @@ function createTerminal(): void {
addDomListener(paddingElement, 'change', setPadding);
addDomListener(actionElements.find, 'keyup', (e) => {
addons.search.instance.find(actionElements.find.value, getSearchOptions(e));
});
addDomListener(actionElements.findNext, 'keyup', (e) => {
addons.search.instance.findNext(actionElements.findNext.value, getSearchOptions(e));
});
+1
View File
@@ -38,6 +38,7 @@
<h3>Addons Control</h3>
<h4>SearchAddon</h4>
<div style= "display:flex; flex-direction:column;">
<label>Find <input id="find"/></label>
<label>Find next <input id="find-next"/></label>
<label>Find previous <input id="find-previous"/></label>
<label><input type="checkbox" id="regex"/>Use regex</label>