better style for match highlight in popup

This commit is contained in:
nightwing 2013-06-01 22:32:27 +04:00
commit c2b7d1f082
3 changed files with 19 additions and 3 deletions

View file

@ -93,6 +93,7 @@ var $singleLineEditor = function(el) {
var AcePopup = function(parentNode) {
var el = dom.createElement("div");
var popup = new $singleLineEditor(el);
if (parentNode)
parentNode.appendChild(el);
el.style.display = "none";
@ -111,7 +112,9 @@ var AcePopup = function(parentNode) {
popup.renderer.$keepTextAreaAtCursor = false;
popup.setHighlightActiveLine(true);
popup.setSession(new EditSession(""));
// set default highlight color
popup.session.highlight("");
popup.session.$searchHighlight.clazz = "ace_highlight-marker";
popup.on("mousedown", function(e) {
var pos = e.getDocumentPosition();

View file

@ -181,7 +181,7 @@
white-space: nowrap;
}
.ace_marker-layer .ace_step {
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
position: absolute;
z-index: 3;
}
@ -386,3 +386,16 @@
.ace_italic {
font-style: italic;
}
.ace_error-marker {
background-color: rgba(255, 0, 0,0.2);
position: absolute;
z-index: 9;
}
.ace_highlight-marker {
background-color: rgba(255, 255, 0,0.2);
position: absolute;
z-index: 8;
}

View file

@ -639,8 +639,8 @@ function Folding() {
if (range && range.end.row <= endRow) try {
var fold = this.addFold("...", range);
fold.collapseChildren = depth;
row = range.end.row;
} catch(e) {}
row = range.end.row;
}
};