Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit eaa574f

Browse files
author
mattpass
committed
Only create an rBlock for result lines, not non match lines
1 parent 8d4dc52 commit eaa574f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

assets/js/icecoder.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,7 +3065,7 @@ var ICEcoder = {
30653065
},
30663066

30673067
findInCMContent: function(thisCM, rExp, selectNext) {
3068-
let avgBlockH, addPadding, rBlocks, haveMatch, blockColor, rExpMatch0String;
3068+
let avgBlockH, addPadding, rBlocks, haveMatch, rExpMatch0String;
30693069

30703070
// Start new iterators for line & last line
30713071
let i = 0;
@@ -3113,10 +3113,10 @@ var ICEcoder = {
31133113
}
31143114
// If the avg block height for results in results bar is above 0.5 pixels high, we can add a DOM elem
31153115
if (0.5 <= avgBlockH) {
3116-
// Grey for a matching line, transparent if no match
3117-
blockColor = haveMatch ? "rgba(128,128,128,0.3)" : "transparent";
31183116
// Add the DOM elem into our rBlocks string
3119-
rBlocks += '<div style="position: absolute; display: block; width: 12px; height:' + avgBlockH + 'px; background: ' + blockColor + '; top: ' + parseInt((avgBlockH * (i - 1)) + addPadding, 10) + 'px" id="rBlock' + i +'"></div>';
3117+
if (true === haveMatch) {
3118+
rBlocks += '<div style="position: absolute; display: block; width: 12px; height:' + avgBlockH + 'px; background: rgba(128,128,128,0.3); top: ' + parseInt((avgBlockH * (i - 1)) + addPadding, 10) + 'px" id="rBlock' + i +'"></div>';
3119+
}
31203120
}
31213121
});
31223122

0 commit comments

Comments
 (0)