kopia lustrzana https://github.com/c9/core
fix +6291 Hard to tell what pane has focus in Vim mode
rodzic
d3dfbdbbae
commit
e704fb6a36
|
@ -733,10 +733,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;\
|
||||||
|
@ -762,23 +766,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();
|
||||||
|
@ -5814,7 +5801,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 = {
|
||||||
|
@ -5828,9 +5815,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;
|
||||||
|
@ -5991,16 +5978,16 @@ 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;
|
||||||
|
@ -6042,7 +6029,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);
|
||||||
|
|
Ładowanie…
Reference in New Issue