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

Commit

Permalink
Merge pull request #289 from pycom/develop
Browse files Browse the repository at this point in the history
new release
  • Loading branch information
Jakob Rosenberg authored Feb 21, 2022
2 parents a501331 + 268d6c8 commit a9e4f90
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ export default class Config {
"Changes the terminal font size.",
order: 14,
},
scrollback: {
type: "number",
default: 5000,
title: "Scrollback",
description: "The max number of lines to preserve in the terminal.",
order: 15
},
};
}
}
2 changes: 1 addition & 1 deletion lib/views/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class Term {
rows: this.term_rows.default,
cols: 120,
rendererType: 'dom',
scrollback: 5000,
scrollback: this.api.config('scrollback')
});
this.xterm.loadAddon(this.fit);
// for copy-paste with cmd key
Expand Down
5 changes: 5 additions & 0 deletions lib/wrappers/settings-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default class SettingsWrapper extends EventEmitter {
this.auto_connect = this.api.config('auto_connect');
this.py_ignore = this.api.config('py_ignore');
this.fast_upload = this.api.config('fast_upload');
this.scrollback = this.api.config('scrollback');
this.autoconnect_comport_manufacturers = this.api.config(
'autoconnect_comport_manufacturers',
);
Expand Down Expand Up @@ -242,6 +243,9 @@ export default class SettingsWrapper extends EventEmitter {
if ('font_size' in this.project_config) {
this.font_size = this.project_config.font_size;
}
if('scrollback' in this.project_config) {
this.scrollback = this.project_config.scrollback
}
}

getDefaultProjectConfig() {
Expand All @@ -258,6 +262,7 @@ export default class SettingsWrapper extends EventEmitter {
py_ignore: this.api.config('py_ignore'),
fast_upload: this.api.config('fast_upload'),
font_size: this.api.config('font_size'),
scrollback: this.api.config('scrollback'),
};
return config;
}
Expand Down

0 comments on commit a9e4f90

Please sign in to comment.