Fix actions and styles
This commit is contained in:
+15
-15
@@ -35,21 +35,6 @@ function setPadding() {
|
|||||||
|
|
||||||
createTerminal();
|
createTerminal();
|
||||||
|
|
||||||
addDomListener(paddingElement, 'change', setPadding);
|
|
||||||
|
|
||||||
addDomListener(actionElements.findNext, 'keypress', function (e) {
|
|
||||||
if (e.key === "Enter") {
|
|
||||||
e.preventDefault();
|
|
||||||
term.findNext(actionElements.findNext.value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
addDomListener(actionElements.findPrevious, 'keypress', function (e) {
|
|
||||||
if (e.key === "Enter") {
|
|
||||||
e.preventDefault();
|
|
||||||
term.findPrevious(actionElements.findPrevious.value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const disposeRecreateButtonHandler = () => {
|
const disposeRecreateButtonHandler = () => {
|
||||||
// If the terminal exists dispose of it, otherwise recreate it
|
// If the terminal exists dispose of it, otherwise recreate it
|
||||||
if (term) {
|
if (term) {
|
||||||
@@ -93,6 +78,21 @@ function createTerminal() {
|
|||||||
term.fit();
|
term.fit();
|
||||||
term.focus();
|
term.focus();
|
||||||
|
|
||||||
|
addDomListener(paddingElement, 'change', setPadding);
|
||||||
|
|
||||||
|
addDomListener(actionElements.findNext, 'keypress', function (e) {
|
||||||
|
if (e.key === "Enter") {
|
||||||
|
e.preventDefault();
|
||||||
|
term.findNext(actionElements.findNext.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
addDomListener(actionElements.findPrevious, 'keypress', function (e) {
|
||||||
|
if (e.key === "Enter") {
|
||||||
|
e.preventDefault();
|
||||||
|
term.findPrevious(actionElements.findPrevious.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// fit is called within a setTimeout, cols and rows need this.
|
// fit is called within a setTimeout, cols and rows need this.
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
initOptions(term);
|
initOptions(term);
|
||||||
|
|||||||
Reference in New Issue
Block a user