some minor fixes for highlighting the selected word
This commit is contained in:
parent
b231b6269e
commit
be33a3515f
2 changed files with 5 additions and 3 deletions
|
|
@ -147,4 +147,7 @@
|
||||||
.ace_marker-layer .ace_selected_word {
|
.ace_marker-layer .ace_selected_word {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 6;
|
z-index: 6;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,8 +120,7 @@ var Mode = function() {
|
||||||
session.$selectionOccurrences = [];
|
session.$selectionOccurrences = [];
|
||||||
ranges.forEach(function(range) {
|
ranges.forEach(function(range) {
|
||||||
if (!range.contains(selection.start.row, selection.start.column)) {
|
if (!range.contains(selection.start.row, selection.start.column)) {
|
||||||
var marker = editor.renderer.addMarker(range,
|
var marker = session.addMarker(range, "ace_selected_word");
|
||||||
"ace_selected_word");
|
|
||||||
session.$selectionOccurrences.push(marker);
|
session.$selectionOccurrences.push(marker);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -134,7 +133,7 @@ var Mode = function() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
editor.session.$selectionOccurrences.forEach(function(marker) {
|
editor.session.$selectionOccurrences.forEach(function(marker) {
|
||||||
editor.renderer.removeMarker(marker);
|
editor.session.removeMarker(marker);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue