Skip to content

Commit

Permalink
fix: line jumps on cursor movement when word wrap is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Dec 7, 2024
1 parent c3da43f commit bfa1261
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/extensions/default/DarkTheme/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
.CodeMirror-matchingtag {
/* Ensure visibility against gray inline editor background */
background-color: @matching-tags;
display: inline-block;
--border-height: calc((var(--editor-line-height) *1em - 1em) / 2);
border-top: var(--border-height) solid @matching-tags;
border-bottom: var(--border-height) solid @matching-tags;
}

.CodeMirror-overwrite .CodeMirror-cursor {
Expand Down
9 changes: 9 additions & 0 deletions src/extensions/default/LightTheme/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@

// This is the default theme and doesn't need to do anything!
/* Default theme empty. See brackets_theme_default.less to change theme css*/

@matching-bracket: #cfead6;

.CodeMirror-matchingtag {
background: @matching-bracket;
--border-height: calc((var(--editor-line-height) *1em - 1em) / 2);
border-top: var(--border-height) solid @matching-bracket;
border-bottom: var(--border-height) solid @matching-bracket;
}
1 change: 0 additions & 1 deletion src/styles/brackets_codemirror_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ div.CodeMirror-cursors {

.CodeMirror-matchingtag {
background: @matching-bracket;
display: inline-block;
}
}

Expand Down

0 comments on commit bfa1261

Please sign in to comment.