kopia lustrzana https://github.com/c9/core
improve handling of ex commands in vim mode
rodzic
db38883182
commit
ae841365f2
|
@ -384,8 +384,8 @@ define(function(require, exports, module) {
|
|||
else if (commands.commands[firstCmd]) {
|
||||
commands.exec(firstCmd, null, { argv: args });
|
||||
}
|
||||
else if (/^\d+$/.test(cmd)) {
|
||||
ed.gotoLine(cmd, 0, true);
|
||||
else if (/^[+\-\d,]+$/.test(cmd)) {
|
||||
Vim.handleEx(ed.state.cm, cmd);
|
||||
}
|
||||
else {
|
||||
for (var key in this.reCommands) {
|
||||
|
@ -463,7 +463,7 @@ define(function(require, exports, module) {
|
|||
cmdLine.addToHistory();
|
||||
cmdLine.setValue("");
|
||||
var editor = getActiveEditor();
|
||||
if (editor) editor.focus();
|
||||
if (editor) editor.textInput.focus();
|
||||
}
|
||||
|
||||
function initCmdLine(cmdLine) {
|
||||
|
|
|
@ -7,7 +7,8 @@ exports.aceKeyboardHandler = require("ace/keyboard/vim").handler;
|
|||
|
||||
exports.aceKeyboardHandler.defaultKeymap.unshift(
|
||||
{ keys: ':', type: 'action', action: 'aceCommand', actionArgs: { exec: function(ace) {
|
||||
ace.showCommandLine(":");
|
||||
var selector = ace.state.cm.state.vim.visualMode ? "'<,'>" : "";
|
||||
ace.showCommandLine(":" + selector);
|
||||
} }}
|
||||
);
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ define(function(require, exports, module) {
|
|||
docElement = txtQuickfixDoc.$ext;
|
||||
cursorConfig = ace.renderer.$cursorLayer.config;
|
||||
lineHeight = cursorConfig.lineHeight + EXTRA_LINE_HEIGHT;
|
||||
var style = dom.computedStyle(editor.amlEditor.$ext);
|
||||
var style = getComputedStyle(editor.amlEditor.$ext);
|
||||
quickfixElement.style.fontSize = style.fontSize;
|
||||
|
||||
barQuickfixCont.setAttribute('visible', true);
|
||||
|
|
|
@ -189,7 +189,7 @@ define(function(require, exports, module) {
|
|||
var cursorConfig = ace.renderer.$cursorLayer.config;
|
||||
if (!cursorConfig)
|
||||
return;
|
||||
labelHeight = dom.getInnerHeight(tooltipEl);
|
||||
labelHeight = tooltipEl.getBoundingClientRect().height;
|
||||
isTopdown = true;
|
||||
if (row > cursorPos.row) // don't obscure cursor
|
||||
isTopdown = true;
|
||||
|
|
|
@ -359,8 +359,8 @@ var BlameGutter = function(editor, blameStr) {
|
|||
blameHtml[$blameIndex] += this.session.getRowLength(i - 1) * lineHeight;
|
||||
}
|
||||
|
||||
this.element = dom.setInnerHtml(this.element, html.join(""));
|
||||
this.blameColumn.element = dom.setInnerHtml(blameEl, blameHtml.join(""));
|
||||
this.element.innerHTML = html.join("");
|
||||
blameEl.innerHTML = blameHtml.join("");
|
||||
this.element.style.height = config.minHeight + "px";
|
||||
|
||||
var gutterWidth = this.element.parentNode.offsetWidth;
|
||||
|
|
|
@ -8062,15 +8062,10 @@ apf.GuiElement.propHandlers = {
|
|||
else { //if (apf.isTrue(value)) default
|
||||
if (this.$ext) {
|
||||
this.$ext.style.display = ""; //Some form of inheritance detection
|
||||
if (!this.$ext.offsetHeight)
|
||||
if (getComputedStyle(this.$ext).display == "none")
|
||||
this.$ext.style.display = this.$display || "block";
|
||||
}
|
||||
|
||||
|
||||
// if (apf.layout && this.$int) //apf.hasSingleRszEvent)
|
||||
// apf.layout.forceResize(this.$int);//this.$int
|
||||
|
||||
|
||||
this.visible = true;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -715,18 +715,16 @@ dom.importCssString(".normal-mode .ace_cursor{\
|
|||
.ace_dialog {\
|
||||
position: absolute;\
|
||||
left: 0; right: 0;\
|
||||
background: white;\
|
||||
background: inherit;\
|
||||
z-index: 15;\
|
||||
padding: .1em .8em;\
|
||||
overflow: hidden;\
|
||||
color: #333;\
|
||||
color: inherit;\
|
||||
}\
|
||||
.ace_dialog-top {\
|
||||
border-bottom: 1px solid #eee;\
|
||||
top: 0;\
|
||||
}\
|
||||
.ace_dialog-bottom {\
|
||||
border-top: 1px solid #eee;\
|
||||
bottom: 0;\
|
||||
}\
|
||||
.ace_dialog input {\
|
||||
|
|
|
@ -55,7 +55,7 @@ var Cells = function(parentEl) {
|
|||
this.renderPlaceHolder(provider, html, config);
|
||||
}
|
||||
|
||||
this.element = dom.setInnerHtml(this.element, html.join(""));
|
||||
this.element.innerHTML = html.join("");
|
||||
|
||||
if (!vsize) {
|
||||
this.measureSizes();
|
||||
|
@ -134,7 +134,7 @@ var Cells = function(parentEl) {
|
|||
this.renderPlaceHolder(provider, html, config);
|
||||
}
|
||||
|
||||
this.element = dom.setInnerHtml(this.element, html.join(""));
|
||||
this.element.innerHTML = html.join("");
|
||||
};
|
||||
|
||||
this.updateClasses = function(config) {
|
||||
|
|
Ładowanie…
Reference in New Issue