Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Commit a9e4f90

Browse files
author
Jakob Rosenberg
authored
Merge pull request #289 from pycom/develop
new release
2 parents a501331 + 268d6c8 commit a9e4f90

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

lib/config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@ export default class Config {
217217
"Changes the terminal font size.",
218218
order: 14,
219219
},
220+
scrollback: {
221+
type: "number",
222+
default: 5000,
223+
title: "Scrollback",
224+
description: "The max number of lines to preserve in the terminal.",
225+
order: 15
226+
},
220227
};
221228
}
222229
}

lib/views/terminal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class Term {
3030
rows: this.term_rows.default,
3131
cols: 120,
3232
rendererType: 'dom',
33-
scrollback: 5000,
33+
scrollback: this.api.config('scrollback')
3434
});
3535
this.xterm.loadAddon(this.fit);
3636
// for copy-paste with cmd key

lib/wrappers/settings-wrapper.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export default class SettingsWrapper extends EventEmitter {
126126
this.auto_connect = this.api.config('auto_connect');
127127
this.py_ignore = this.api.config('py_ignore');
128128
this.fast_upload = this.api.config('fast_upload');
129+
this.scrollback = this.api.config('scrollback');
129130
this.autoconnect_comport_manufacturers = this.api.config(
130131
'autoconnect_comport_manufacturers',
131132
);
@@ -242,6 +243,9 @@ export default class SettingsWrapper extends EventEmitter {
242243
if ('font_size' in this.project_config) {
243244
this.font_size = this.project_config.font_size;
244245
}
246+
if('scrollback' in this.project_config) {
247+
this.scrollback = this.project_config.scrollback
248+
}
245249
}
246250

247251
getDefaultProjectConfig() {
@@ -258,6 +262,7 @@ export default class SettingsWrapper extends EventEmitter {
258262
py_ignore: this.api.config('py_ignore'),
259263
fast_upload: this.api.config('fast_upload'),
260264
font_size: this.api.config('font_size'),
265+
scrollback: this.api.config('scrollback'),
261266
};
262267
return config;
263268
}

0 commit comments

Comments
 (0)