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 #288 from pycom/feat-configurable-max-scrollback
Browse files Browse the repository at this point in the history
Feat configurable max scrollback
  • Loading branch information
jakobrosenberg authored Feb 21, 2022
2 parents 01989e0 + e03711a commit 268d6c8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [2.2.2](https://github.com/pycom/pymakr-atom/compare/v2.2.1...v2.2.2) (2022-01-31)


### Bug Fixes

* removed deprecated "synchronize project" ([7df8f8a](https://github.com/pycom/pymakr-atom/commit/7df8f8a4f61d1b756170bbf25d5b3a7d6142412d))

## [2.2.1](https://github.com/pycom/pymakr-atom/compare/v2.2.0...v2.2.1) (2022-01-13)


Expand Down
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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pymakr",
"main": "./lib/main.js",
"version": "2.2.1",
"version": "2.2.2",
"description": "Adds a REPL console to Atom that connects to your Pycom board. It can run code on the board or synchronize your project files to it.",
"keywords": [
"Pycom",
Expand Down

0 comments on commit 268d6c8

Please sign in to comment.