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

Commit 5f74a46

Browse files
committed
fix(plugins/plugin-client-common): SourceRef viewer should hide liner numbers but show folding
Fixes #5719
1 parent 10181a4 commit 5f74a46

File tree

2 files changed

+3
-2
lines changed
  • plugins/plugin-client-common/src/components

2 files changed

+3
-2
lines changed

plugins/plugin-client-common/src/components/Content/Editor/lib/defaults.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface Options {
2121
readOnly?: boolean
2222
simple?: boolean
2323
fontSize?: number
24+
language?: string
2425
}
2526

2627
export default (options: Options): editor.IEditorConstructionOptions => ({
@@ -42,7 +43,7 @@ export default (options: Options): editor.IEditorConstructionOptions => ({
4243

4344
// simplify the UI?
4445
links: !options.simple,
45-
folding: !options.simple,
46+
folding: !options.simple || !/markdown|text|shell/i.test(options.language),
4647
lineNumbers: options.simple ? 'off' : 'on',
4748
wordWrap: options.simple ? 'on' : undefined,
4849
lineDecorationsWidth: options.simple ? 0 : undefined

plugins/plugin-client-common/src/components/Views/Terminal/Block/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export abstract class InputProvider<S extends State = State> extends React.PureC
265265
contentType={_.contentType}
266266
className="kui--source-ref-editor kui--inverted-color-context"
267267
fontSize={12}
268-
simple={this.props.isPartOfMiniSplit}
268+
simple={this.props.isPartOfMiniSplit || this.props.isWidthConstrained}
269269
/>
270270
</ExpandableSection>
271271
)

0 commit comments

Comments
 (0)