Skip to content

Commit 06abe80

Browse files
committed
Adds nowrap to active line-number in editor (neo4j#1793)
1 parent 84f956a commit 06abe80

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/browser/modules/Editor/styled.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ export const EditorContainer = styled.div`
6767
min-width: 0;
6868
width: 0; // needed to prevent the editor from growing the text field
6969
min-width: 0;
70+
71+
/* The monaco editor calculates width of the line number based on the max width of the digits 0-9 and no other characters.
72+
This causes the line number to sometime line-break, nowrap fixes this.
73+
The calculation also makes the line sometime be too long which makes the indent of the line number too large. */
74+
& .active-line-number {
75+
white-space: nowrap;
76+
}
7077
`
7178

7279
export const FlexContainer = styled.div`

0 commit comments

Comments
 (0)