diff options
author | Wu Cheng-Han | 2015-07-02 00:10:20 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2015-07-02 00:10:20 +0800 |
commit | 10c9811fc534a2738c19d8f74a447ed500b730a2 (patch) | |
tree | 8e46f99f36660d9c011d135fc6ce736733a5876b /public/vendor/codemirror/lib | |
parent | f7f8c901f4bc39c3ed0a2bdfe1cbaa1ee6957999 (diff) |
Jump to 0.3.1
Diffstat (limited to 'public/vendor/codemirror/lib')
-rwxr-xr-x | public/vendor/codemirror/lib/codemirror.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/public/vendor/codemirror/lib/codemirror.js b/public/vendor/codemirror/lib/codemirror.js index 1db591f9..bd544271 100755 --- a/public/vendor/codemirror/lib/codemirror.js +++ b/public/vendor/codemirror/lib/codemirror.js @@ -1318,11 +1318,13 @@ minimal = hasCopyEvent && (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000); var content = minimal ? "-" : selected || cm.getSelection(); - this.textarea.value = content; + if(!this.composing) + this.textarea.value = content; if (cm.state.focused) selectInput(this.textarea); if (ie && ie_version >= 9) this.hasSelection = content; } else if (!typing) { - this.prevInput = this.textarea.value = ""; + if(!this.composing) + this.prevInput = this.textarea.value = ""; if (ie && ie_version >= 9) this.hasSelection = null; } this.inaccurateSelection = minimal; |