@@ -2893,7 +2893,7 @@ var ICEcoder = {
2893
2893
2894
2894
// Find & replace text according to user selections
2895
2895
findReplace : function ( find , selectNext , canActionChanges , findPrevious ) {
2896
- let replace , results , rExp , thisCM , thisSelection , rBlocks , rExpMatch0String , replaceQS , targetQS , filesQS ;
2896
+ let replace , results , rExp , thisCM , thisSelection , rBlocks , rExpMatch0String , replaceQS , targetQS , filesQS , currRBlock ;
2897
2897
2898
2898
// Get our replace value and results display
2899
2899
replace = get ( 'replace' ) . value ;
@@ -3006,6 +3006,12 @@ var ICEcoder = {
3006
3006
this . content . contentWindow . document . getElementById ( 'resultsBar' ) . innerHTML = rBlocks ;
3007
3007
this . content . contentWindow . document . getElementById ( 'resultsBar' ) . style . display = "inline-block" ;
3008
3008
3009
+ // Mark the currRBlock (result for current line) in red
3010
+ currRBlock = this . content . contentWindow . document . getElementById ( 'rBlock' + ( thisCM . getCursor ( ) . line + 1 ) ) ;
3011
+ if ( currRBlock ) {
3012
+ currRBlock . style . background = "rgba(192,0,0,0.3)" ;
3013
+ }
3014
+
3009
3015
return true ;
3010
3016
3011
3017
} else {
@@ -3107,10 +3113,10 @@ var ICEcoder = {
3107
3113
}
3108
3114
// If the avg block height for results in results bar is above 0.5 pixels high, we can add a DOM elem
3109
3115
if ( 0.5 <= avgBlockH ) {
3110
- // Red for current line, grey for another line, transparent if no match
3111
- blockColor = haveMatch ? thisCM . getCursor ( ) . line + 1 == i ? "rgba(192,0,0,0.3)" : "rgba(128,128,128,0.3)" : "transparent" ;
3116
+ // Grey for a matching line, transparent if no match
3117
+ blockColor = haveMatch ? "rgba(128,128,128,0.3)" : "transparent" ;
3112
3118
// Add the DOM elem into our rBlocks string
3113
- rBlocks += '<div style="position: absolute; display: block; width: 12px; height:' + avgBlockH + 'px; background: ' + blockColor + '; top: ' + parseInt ( ( avgBlockH * ( i - 1 ) ) + addPadding , 10 ) + 'px"></div>' ;
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>';
3114
3120
}
3115
3121
} ) ;
3116
3122
0 commit comments