mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Add scrollback option to config (#3038)
This commit is contained in:
parent
65ef7aec8f
commit
ae3d1f01a6
5 changed files with 9 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue