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

Commit 268d6c8

Browse files
Merge pull request #288 from pycom/feat-configurable-max-scrollback
Feat configurable max scrollback
2 parents 01989e0 + e03711a commit 268d6c8

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [2.2.2](https://github.com/pycom/pymakr-atom/compare/v2.2.1...v2.2.2) (2022-01-31)
2+
3+
4+
### Bug Fixes
5+
6+
* removed deprecated "synchronize project" ([7df8f8a](https://github.com/pycom/pymakr-atom/commit/7df8f8a4f61d1b756170bbf25d5b3a7d6142412d))
7+
18
## [2.2.1](https://github.com/pycom/pymakr-atom/compare/v2.2.0...v2.2.1) (2022-01-13)
29

310

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
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pymakr",
33
"main": "./lib/main.js",
4-
"version": "2.2.1",
4+
"version": "2.2.2",
55
"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.",
66
"keywords": [
77
"Pycom",

0 commit comments

Comments
 (0)