kopia lustrzana https://github.com/c9/core
Merge pull request +14014 from c9/ide-terminal-ime
minimal fix for ime in terminalpull/312/head
commit
6ba3f217c8
|
@ -148,7 +148,7 @@ var EditSession = function(text, mode) {
|
|||
this.$undoSelect = true;
|
||||
|
||||
this.$foldData = [];
|
||||
this.id = "session" + EditSession.$uid;
|
||||
this.id = "session" + (++EditSession.$uid);
|
||||
this.$foldData.toString = function() {
|
||||
return this.join("\n");
|
||||
};
|
||||
|
|
|
@ -364,10 +364,11 @@ var TextInput = function(parentNode, host) {
|
|||
return;
|
||||
// console.log("onCompositionStart", inComposition)
|
||||
inComposition = {};
|
||||
inComposition.canUndo = host.session.$undoManager;
|
||||
host.onCompositionStart();
|
||||
setTimeout(onCompositionUpdate, 0);
|
||||
host.on("mousedown", onCompositionEnd);
|
||||
if (!host.selection.isEmpty()) {
|
||||
if (inComposition.canUndo && !host.selection.isEmpty()) {
|
||||
host.insert("");
|
||||
host.session.markUndoGroup();
|
||||
host.selection.clearSelection();
|
||||
|
@ -385,7 +386,8 @@ var TextInput = function(parentNode, host) {
|
|||
host.onCompositionUpdate(val);
|
||||
if (inComposition.lastValue)
|
||||
host.undo();
|
||||
inComposition.lastValue = val;
|
||||
if (inComposition.canUndo)
|
||||
inComposition.lastValue = val;
|
||||
if (inComposition.lastValue) {
|
||||
var r = host.selection.getRange();
|
||||
host.insert(inComposition.lastValue);
|
||||
|
|
Ładowanie…
Reference in New Issue