mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-15 21:28:40 -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, {
|
const props = getTermProps(uid, this.props, {
|
||||||
isTermActive: uid === this.props.activeSession,
|
isTermActive: uid === this.props.activeSession,
|
||||||
term: termRef ? termRef.term : null,
|
term: termRef ? termRef.term : null,
|
||||||
|
scrollback: this.props.scrollback,
|
||||||
backgroundColor: this.props.backgroundColor,
|
backgroundColor: this.props.backgroundColor,
|
||||||
foregroundColor: this.props.foregroundColor,
|
foregroundColor: this.props.foregroundColor,
|
||||||
colors: this.props.colors,
|
colors: this.props.colors,
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ const getTermOptions = props => {
|
||||||
const backgroundColor = needTransparency ? 'transparent' : props.backgroundColor;
|
const backgroundColor = needTransparency ? 'transparent' : props.backgroundColor;
|
||||||
return {
|
return {
|
||||||
macOptionIsMeta: props.modifierKeys.altIsMeta,
|
macOptionIsMeta: props.modifierKeys.altIsMeta,
|
||||||
|
scrollback: props.scrollback,
|
||||||
cursorStyle: CURSOR_STYLES[props.cursorShape],
|
cursorStyle: CURSOR_STYLES[props.cursorShape],
|
||||||
cursorBlink: props.cursorBlink,
|
cursorBlink: props.cursorBlink,
|
||||||
fontFamily: props.fontFamily,
|
fontFamily: props.fontFamily,
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ export default class Terms extends React.Component {
|
||||||
terms: this.terms,
|
terms: this.terms,
|
||||||
activeSession: this.props.activeSession,
|
activeSession: this.props.activeSession,
|
||||||
sessions: this.props.sessions,
|
sessions: this.props.sessions,
|
||||||
|
scrollback: this.props.scrollback,
|
||||||
backgroundColor: this.props.backgroundColor,
|
backgroundColor: this.props.backgroundColor,
|
||||||
foregroundColor: this.props.foregroundColor,
|
foregroundColor: this.props.foregroundColor,
|
||||||
borderColor: this.props.borderColor,
|
borderColor: this.props.borderColor,
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ const TermsContainer = connect(
|
||||||
sessions,
|
sessions,
|
||||||
cols: state.ui.cols,
|
cols: state.ui.cols,
|
||||||
rows: state.ui.rows,
|
rows: state.ui.rows,
|
||||||
|
scrollback: state.ui.scrollback,
|
||||||
termGroups: getRootGroups(state),
|
termGroups: getRootGroups(state),
|
||||||
activeRootGroup: state.termGroups.activeRootGroup,
|
activeRootGroup: state.termGroups.activeRootGroup,
|
||||||
activeSession: state.sessions.activeUid,
|
activeSession: state.sessions.activeUid,
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ const allowedWindowControlsValues = new Set([true, false, 'left']);
|
||||||
const initial = Immutable({
|
const initial = Immutable({
|
||||||
cols: null,
|
cols: null,
|
||||||
rows: null,
|
rows: null,
|
||||||
|
scrollback: 1000,
|
||||||
activeUid: null,
|
activeUid: null,
|
||||||
cursorColor: '#F81CE5',
|
cursorColor: '#F81CE5',
|
||||||
cursorAccentColor: '#000',
|
cursorAccentColor: '#000',
|
||||||
|
|
@ -116,6 +117,10 @@ const reducer = (state = initial, action) => {
|
||||||
(() => {
|
(() => {
|
||||||
const ret = {};
|
const ret = {};
|
||||||
|
|
||||||
|
if (config.scrollback) {
|
||||||
|
ret.scrollback = config.scrollback;
|
||||||
|
}
|
||||||
|
|
||||||
if (state.fontSizeOverride && config.fontSize !== state.fontSize) {
|
if (state.fontSizeOverride && config.fontSize !== state.fontSize) {
|
||||||
ret.fontSizeOverride = null;
|
ret.fontSizeOverride = null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue