better style for match highlight in popup
This commit is contained in:
parent
f6f475747b
commit
c2b7d1f082
3 changed files with 19 additions and 3 deletions
|
|
@ -93,6 +93,7 @@ var $singleLineEditor = function(el) {
|
||||||
var AcePopup = function(parentNode) {
|
var AcePopup = function(parentNode) {
|
||||||
var el = dom.createElement("div");
|
var el = dom.createElement("div");
|
||||||
var popup = new $singleLineEditor(el);
|
var popup = new $singleLineEditor(el);
|
||||||
|
|
||||||
if (parentNode)
|
if (parentNode)
|
||||||
parentNode.appendChild(el);
|
parentNode.appendChild(el);
|
||||||
el.style.display = "none";
|
el.style.display = "none";
|
||||||
|
|
@ -111,7 +112,9 @@ var AcePopup = function(parentNode) {
|
||||||
popup.renderer.$keepTextAreaAtCursor = false;
|
popup.renderer.$keepTextAreaAtCursor = false;
|
||||||
|
|
||||||
popup.setHighlightActiveLine(true);
|
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) {
|
popup.on("mousedown", function(e) {
|
||||||
var pos = e.getDocumentPosition();
|
var pos = e.getDocumentPosition();
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_marker-layer .ace_step {
|
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
@ -386,3 +386,16 @@
|
||||||
.ace_italic {
|
.ace_italic {
|
||||||
font-style: 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;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -639,8 +639,8 @@ function Folding() {
|
||||||
if (range && range.end.row <= endRow) try {
|
if (range && range.end.row <= endRow) try {
|
||||||
var fold = this.addFold("...", range);
|
var fold = this.addFold("...", range);
|
||||||
fold.collapseChildren = depth;
|
fold.collapseChildren = depth;
|
||||||
|
row = range.end.row;
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
row = range.end.row;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue