Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit fc4e2a2

Browse files
committed
fix(plugins/plugin-client-common): split button errors are not reported to the user
Fixes #4876
1 parent a0616c2 commit fc4e2a2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plugins/plugin-client-common/src/components/Client/TopTabStripe/SplitTerminalButton.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
*/
1616

1717
import * as React from 'react'
18-
import { i18n } from '@kui-shell/core'
18+
import { i18n, pexecInCurrentTab } from '@kui-shell/core'
1919

2020
import Icons from '../../spi/Icons'
2121
import KuiContext from '../context'
2222
import onSplit from '../../../controller/split'
2323

2424
const strings = i18n('plugin-client-common')
2525

26+
/**
27+
* re: the impl of the onClick handler, see
28+
* https://github.com/IBM/kui/issues/4876
29+
*
30+
*/
2631
export default class SplitTerminalButtonButton extends React.PureComponent {
2732
public render() {
2833
return (
@@ -36,7 +41,7 @@ export default class SplitTerminalButtonButton extends React.PureComponent {
3641
aria-label="Split terminal"
3742
tabIndex={0}
3843
title={strings('Split the Terminal')}
39-
onClick={() => onSplit()}
44+
onClick={() => onSplit().catch(() => pexecInCurrentTab('split'))}
4045
>
4146
<Icons icon="Split" />
4247
</a>

0 commit comments

Comments
 (0)