From 321f91935ab3064c64225c9b77b6bd5ba88a9659 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 15 Dec 2016 19:12:39 +0000 Subject: [PATCH 1/4] focus tab created by ctrl-n --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4333d6e1..83cf07dd 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "c9.ide.language.python": "#189b55135d", "c9.ide.language.go": "#c58539fc05", "c9.ide.navigate": "#5d5707058c", - "c9.ide.newresource": "#981a408a7b", + "c9.ide.newresource": "#636e7a7345", "c9.ide.openfiles": "#2ae85a9e33", "c9.ide.preview": "#5f5fff0185", "c9.ide.preview.browser": "#829f0ac50f", From b5d9105d0617ee7ae592a9aae2ea7792fa106246 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 15 Dec 2016 20:49:40 +0000 Subject: [PATCH 2/4] fix order of ctrl-shift-p on mac --- node_modules/ace/lib/ace/commands/default_commands.js | 2 +- node_modules/ace/lib/ace/keyboard/hash_handler.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/node_modules/ace/lib/ace/commands/default_commands.js b/node_modules/ace/lib/ace/commands/default_commands.js index 372b95a3..472da7d5 100644 --- a/node_modules/ace/lib/ace/commands/default_commands.js +++ b/node_modules/ace/lib/ace/commands/default_commands.js @@ -622,7 +622,7 @@ exports.commands = [{ scrollIntoView: "cursor" }, { name: "transposeletters", - bindKey: bindKey("Ctrl-T", "Ctrl-T"), + bindKey: bindKey("Alt-X", "Ctrl-X"), exec: function(editor) { editor.transposeLetters(); }, multiSelectAction: function(editor) {editor.transposeSelections(1); }, scrollIntoView: "cursor" diff --git a/node_modules/ace/lib/ace/keyboard/hash_handler.js b/node_modules/ace/lib/ace/keyboard/hash_handler.js index 730b313e..697c6c44 100644 --- a/node_modules/ace/lib/ace/keyboard/hash_handler.js +++ b/node_modules/ace/lib/ace/keyboard/hash_handler.js @@ -119,7 +119,8 @@ MultiHashHandler.prototype = HashHandler.prototype; function getPosition(command) { return typeof command == "object" && command.bindKey - && command.bindKey.position || 0; + && command.bindKey.position + || (command.isDefault ? -100 : 0); } this._addCommandToBinding = function(keyId, command, position) { var ckb = this.commandKeyBinding, i; @@ -133,13 +134,11 @@ MultiHashHandler.prototype = HashHandler.prototype; } else if ((i = ckb[keyId].indexOf(command)) != -1) { ckb[keyId].splice(i, 1); } - + if (typeof position != "number") { - if (position || command.isDefault) - position = -100; - else - position = getPosition(command); + position = getPosition(command); } + var commands = ckb[keyId]; for (i = 0; i < commands.length; i++) { var other = commands[i]; From 33833a7ec804e101b17811f3b8be5e867628fe29 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 15 Dec 2016 22:53:02 +0000 Subject: [PATCH 3/4] fix dragging from terminal --- plugins/c9.ide.ui/lib_apf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/c9.ide.ui/lib_apf.js b/plugins/c9.ide.ui/lib_apf.js index d4db9446..7072aa37 100644 --- a/plugins/c9.ide.ui/lib_apf.js +++ b/plugins/c9.ide.ui/lib_apf.js @@ -21558,7 +21558,7 @@ apf.window = function(){ canSelect = false; } - if (amlNode && amlNode.name === "editor::ace") { + if (amlNode && amlNode.name === "editor::ace" || amlNode.class == "c9terminalcontainer") { canSelect = true; } From 4ec8aca648e5ac1e13df5ad39aa9a61fceb53972 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 15 Dec 2016 23:29:19 +0000 Subject: [PATCH 4/4] do not split deltas in multiselct action --- node_modules/ace/lib/ace/editor.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/node_modules/ace/lib/ace/editor.js b/node_modules/ace/lib/ace/editor.js index 9540643b..0545c33e 100644 --- a/node_modules/ace/lib/ace/editor.js +++ b/node_modules/ace/lib/ace/editor.js @@ -966,8 +966,11 @@ var Editor = function(renderer, session) { var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); if (transform) { if (text !== transform.text) { - this.session.mergeUndoDeltas = false; - this.$mergeNextCommand = false; + // keep automatic insertion in a separate delta, unless it is in multiselect mode + if (!this.inVirtualSelectionMode) { + this.session.mergeUndoDeltas = false; + this.mergeNextCommand = false; + } } text = transform.text;