Skip to content

Commit b97c040

Browse files
committed
fix: line jumps on cursor movement when word wrap is enabled
1 parent d1cb630 commit b97c040

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/extensions/default/DarkTheme/main.less

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@
9696
.CodeMirror-matchingtag {
9797
/* Ensure visibility against gray inline editor background */
9898
background-color: @matching-tags;
99-
display: inline-block;
99+
--border-height: calc((var(--editor-line-height) *1em - 1em) / 2);
100+
border-top: var(--border-height) solid @matching-tags;
101+
border-bottom: var(--border-height) solid @matching-tags;
100102
}
101103

102104
.CodeMirror-overwrite .CodeMirror-cursor {

src/extensions/default/LightTheme/main.less

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@
2121

2222
// This is the default theme and doesn't need to do anything!
2323
/* Default theme empty. See brackets_theme_default.less to change theme css*/
24+
25+
@matching-bracket: #cfead6;
26+
27+
.CodeMirror-matchingtag {
28+
background: @matching-bracket;
29+
--border-height: calc((var(--editor-line-height) *1em - 1em) / 2);
30+
border-top: var(--border-height) solid @matching-bracket;
31+
border-bottom: var(--border-height) solid @matching-bracket;
32+
}

src/styles/brackets_codemirror_override.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ div.CodeMirror-cursors {
273273

274274
.CodeMirror-matchingtag {
275275
background: @matching-bracket;
276-
display: inline-block;
277276
}
278277
}
279278

0 commit comments

Comments
 (0)