Skip to content

Commit

Permalink
fix(plugins/plugin-client-common): when there're 3 splits, clicking t…
Browse files Browse the repository at this point in the history
…able in the first split will create the 4th split

Fixes #6932
  • Loading branch information
myan9 authored and starpit committed Feb 2, 2021
1 parent fab7ab9 commit 4fca72b
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1072,7 +1072,10 @@ export default class ScrollableTerminal extends React.PureComponent<Props, State
scrollback.facade.splitCount = () => this.state.splits.length
scrollback.facade.hasSideBySideTerminals = () =>
this.theseAreMiniSplits[this.state.splits.length].findIndex((isMini, idx, S) => {
return !isMini && idx < S.length - 1 && !S[idx + 1]
return (
(!isMini && idx < S.length - 1 && !S[idx + 1]) ||
(!isMini && idx === S.length - 1 && S[idx - 1] && S[idx - 2])
) // e.g. 3 splits
}) >= 0

scrollback.facade.scrollToBottom = () => {
Expand Down

0 comments on commit 4fca72b

Please sign in to comment.