Remove new lines from input tab header

This commit is contained in:
j433866 2019-06-10 13:08:03 +01:00
parent d99cf9d499
commit 5a52e5e9b3
2 changed files with 3 additions and 1 deletions

View File

@ -674,7 +674,7 @@ class InputWaiter {
(value.count("\n") + 1) : null;
this.setInputInfo(value.length, lines);
this.updateInputValue(activeTab, value);
this.manager.tabs.updateInputTabHeader(activeTab, value);
this.manager.tabs.updateInputTabHeader(activeTab, value.replace(/[\n\r]/g, "").slice(0, 100));
if (e && this.badKeys.indexOf(e.keyCode) < 0) {
// Fire the statechange event as the input has been modified

View File

@ -433,6 +433,8 @@ self.updateTabHeader = function(inputNum) {
if (typeof inputData !== "string") {
inputData = input.data.name;
}
inputData = inputData.replace(/[\n\r]/g, "");
self.postMessage({
action: "updateTabHeader",
data: {