},
draw_input: function() {
if (this.mode.has_input_prompt) {
- for (let y = terminal.rows - this.height_input, i = 0; y < terminal.rows && i < this.input_lines.length; y++, i++) {
+ for (let y = terminal.rows - this.height_input, i = 0; i < this.input_lines.length; y++, i++) {
terminal.write(y, this.window_width, this.input_lines[i]);
}
}
tui.inputEl.addEventListener('input', (event) => {
if (tui.mode.has_input_prompt) {
- let max_length = tui.window_width * terminal.rows - tui.input_prompt.length;
+ let max_length = tui.window_width * terminal.rows - tui.input_prompt.length;
if (tui.inputEl.value.length > max_length) {
tui.inputEl.value = tui.inputEl.value.slice(0, max_length);
};