fix +6291 Hard to tell what pane has focus in Vim mode
This commit is contained in:
parent
2713d0a8db
commit
487408e84d
1 changed files with 12 additions and 25 deletions
|
|
@ -738,10 +738,14 @@ CodeMirror.defineExtension = function(name, fn) {
|
||||||
CodeMirror.prototype[name] = fn;
|
CodeMirror.prototype[name] = fn;
|
||||||
};
|
};
|
||||||
dom.importCssString(".normal-mode .ace_cursor{\
|
dom.importCssString(".normal-mode .ace_cursor{\
|
||||||
border: 0!important;\
|
border: 1px solid red;\
|
||||||
background-color: red;\
|
background-color: red;\
|
||||||
opacity: 0.5;\
|
opacity: 0.5;\
|
||||||
}.ace_dialog {\
|
}\
|
||||||
|
.normal-mode .ace_hidden-cursors .ace_cursor{\
|
||||||
|
background-color: transparent;\
|
||||||
|
}\
|
||||||
|
.ace_dialog {\
|
||||||
position: absolute;\
|
position: absolute;\
|
||||||
left: 0; right: 0;\
|
left: 0; right: 0;\
|
||||||
background: white;\
|
background: white;\
|
||||||
|
|
@ -767,23 +771,6 @@ dom.importCssString(".normal-mode .ace_cursor{\
|
||||||
font-family: monospace;\
|
font-family: monospace;\
|
||||||
}", "vimMode");
|
}", "vimMode");
|
||||||
(function() {
|
(function() {
|
||||||
function dialogDiv(cm, template, bottom) {
|
|
||||||
var wrap = cm.ace.container;
|
|
||||||
var dialog;
|
|
||||||
dialog = wrap.appendChild(document.createElement("div"));
|
|
||||||
if (bottom)
|
|
||||||
dialog.className = "ace_dialog ace_dialog-bottom";
|
|
||||||
else
|
|
||||||
dialog.className = "ace_dialog ace_dialog-top";
|
|
||||||
|
|
||||||
if (typeof template == "string") {
|
|
||||||
dialog.innerHTML = template;
|
|
||||||
} else { // Assuming it's a detached DOM element.
|
|
||||||
dialog.appendChild(template);
|
|
||||||
}
|
|
||||||
return dialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeNotification(cm, newVal) {
|
function closeNotification(cm, newVal) {
|
||||||
if (cm.state.currentNotificationClose)
|
if (cm.state.currentNotificationClose)
|
||||||
cm.state.currentNotificationClose();
|
cm.state.currentNotificationClose();
|
||||||
|
|
@ -5944,7 +5931,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
return isHandled;
|
return isHandled;
|
||||||
};
|
}
|
||||||
exports.CodeMirror = CodeMirror;
|
exports.CodeMirror = CodeMirror;
|
||||||
var getVim = Vim.maybeInitVimState_;
|
var getVim = Vim.maybeInitVimState_;
|
||||||
exports.handler = {
|
exports.handler = {
|
||||||
|
|
@ -5958,9 +5945,9 @@ dom.importCssString(".normal-mode .ace_cursor{\
|
||||||
if (!vim.insertMode) {
|
if (!vim.insertMode) {
|
||||||
var isbackwards = !sel.cursor
|
var isbackwards = !sel.cursor
|
||||||
? session.selection.isBackwards() || session.selection.isEmpty()
|
? session.selection.isBackwards() || session.selection.isEmpty()
|
||||||
: Range.comparePoints(sel.cursor, sel.start) <= 0
|
: Range.comparePoints(sel.cursor, sel.start) <= 0;
|
||||||
if (!isbackwards && left > w)
|
if (!isbackwards && left > w)
|
||||||
left -= w
|
left -= w;
|
||||||
}
|
}
|
||||||
if (!vim.insertMode && vim.status) {
|
if (!vim.insertMode && vim.status) {
|
||||||
h = h / 2;
|
h = h / 2;
|
||||||
|
|
@ -6124,13 +6111,13 @@ dom.importCssString(".normal-mode .ace_cursor{\
|
||||||
};
|
};
|
||||||
var renderVirtualNumbers = {
|
var renderVirtualNumbers = {
|
||||||
getText: function(session, row) {
|
getText: function(session, row) {
|
||||||
return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + ""
|
return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + "";
|
||||||
},
|
},
|
||||||
getWidth: function(session, lastLineNumber, config) {
|
getWidth: function(session, lastLineNumber, config) {
|
||||||
return session.getLength().toString().length * config.characterWidth;
|
return session.getLength().toString().length * config.characterWidth;
|
||||||
},
|
},
|
||||||
update: function(e, editor) {
|
update: function(e, editor) {
|
||||||
editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER)
|
editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER);
|
||||||
},
|
},
|
||||||
attach: function(editor) {
|
attach: function(editor) {
|
||||||
editor.renderer.$gutterLayer.$renderer = this;
|
editor.renderer.$gutterLayer.$renderer = this;
|
||||||
|
|
@ -6175,7 +6162,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
|
||||||
if (cm.ace.inVirtualSelectionMode)
|
if (cm.ace.inVirtualSelectionMode)
|
||||||
cm.ace.on("beforeEndOperation", delayedExecAceCommand);
|
cm.ace.on("beforeEndOperation", delayedExecAceCommand);
|
||||||
else
|
else
|
||||||
delayedExecAceCommand(null, cm.ace)
|
delayedExecAceCommand(null, cm.ace);
|
||||||
};
|
};
|
||||||
function delayedExecAceCommand(op, ace) {
|
function delayedExecAceCommand(op, ace) {
|
||||||
ace.off("beforeEndOperation", delayedExecAceCommand);
|
ace.off("beforeEndOperation", delayedExecAceCommand);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue