This repository was archived by the owner on May 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments