Add scrollback option to config (#3038)

This commit is contained in:
Jarid Margolin 2018-05-29 06:11:21 -04:00 committed by CHaBou
parent 6923e5bbb3
commit 28f778037b
5 changed files with 9 additions and 0 deletions

View file

@ -58,6 +58,7 @@ class TermGroup_ extends React.PureComponent {
const props = getTermProps(uid, this.props, {
isTermActive: uid === this.props.activeSession,
term: termRef ? termRef.term : null,
scrollback: this.props.scrollback,
backgroundColor: this.props.backgroundColor,
foregroundColor: this.props.foregroundColor,
colors: this.props.colors,

View file

@ -26,6 +26,7 @@ const getTermOptions = props => {
const backgroundColor = needTransparency ? 'transparent' : props.backgroundColor;
return {
macOptionIsMeta: props.modifierKeys.altIsMeta,
scrollback: props.scrollback,
cursorStyle: CURSOR_STYLES[props.cursorShape],
cursorBlink: props.cursorBlink,
fontFamily: props.fontFamily,

View file

@ -88,6 +88,7 @@ export default class Terms extends React.Component {
terms: this.terms,
activeSession: this.props.activeSession,
sessions: this.props.sessions,
scrollback: this.props.scrollback,
backgroundColor: this.props.backgroundColor,
foregroundColor: this.props.foregroundColor,
borderColor: this.props.borderColor,

View file

@ -17,6 +17,7 @@ const TermsContainer = connect(
sessions,
cols: state.ui.cols,
rows: state.ui.rows,
scrollback: state.ui.scrollback,
termGroups: getRootGroups(state),
activeRootGroup: state.termGroups.activeRootGroup,
activeSession: state.sessions.activeUid,

View file

@ -31,6 +31,7 @@ const allowedWindowControlsValues = new Set([true, false, 'left']);
const initial = Immutable({
cols: null,
rows: null,
scrollback: 1000,
activeUid: null,
cursorColor: '#F81CE5',
cursorAccentColor: '#000',
@ -116,6 +117,10 @@ const reducer = (state = initial, action) => {
(() => {
const ret = {};
if (config.scrollback) {
ret.scrollback = config.scrollback;
}
if (state.fontSizeOverride && config.fontSize !== state.fontSize) {
ret.fontSizeOverride = null;
}