Skip to content

Commit de5356d

Browse files
committed
fix: indent guides causes 1px drift in word wrapped lines
1 parent 9a8c72f commit de5356d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/extensionsIntegrated/indentGuides/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ define(function (require, exports, module) {
136136
} else if (shouldRerender || cm.__overlayEnabled !== enabled) {
137137
cm.__overlayEnabled = enabled;
138138
_reRenderOverlay();
139+
// rare event, should not happen often. log if we are debugging performance related issues.
139140
console.log("Refreshing indent guides");
140141
}
141142
}

src/styles/brackets_codemirror_override.less

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,16 +293,14 @@ span.cm-emstrong {
293293

294294
.cm-phcode-indent-guides::before {
295295
content: " ";
296-
width: 1px;
297296
display: inline-block;
298-
position: relative;
299-
border-left: 1px solid rgba(128, 128, 128, 0.3);
297+
position: absolute;
298+
box-shadow: inset 1px 0 0 rgba(128, 128, 128, 0.3);
300299
}
301300

302301
.cm-phcode-indent-guides-none::before {
303302
content: " ";
304-
width: 1px;
305303
display: inline-block;
306-
position: relative;
307-
border-left: 1px solid transparent;
304+
position: absolute;
305+
box-shadow: none;
308306
}

0 commit comments

Comments
 (0)