Permalink
Browse files

Updated in-line JS autocompletion to work. (it did not work properly …

…earlier).
  • Loading branch information...
1 parent 8d6ec3e commit f13ed601742f545f14167202ace4e55a26782b5d Vytautas Kasparavičius committed Nov 5, 2012
Showing with 3 additions and 7 deletions.
  1. +1 −5 src/autocomplete/editor_plugin.js
  2. +2 −2 src/autocomplete/editor_plugin_src.js

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -191,7 +191,7 @@
if (e.keyCode == ENTER_KEY) {
selectOption(ed, getCurrentWord(ed));
autocomplete_data.cancelEnter = true;
- return; // the enter evet needs to be cancelled on keypress so
+ return false; // the enter evet needs to be cancelled on keypress so
// it doesn't register a carriage return
}
if (e.keyCode == ESC_KEY) {
@@ -327,7 +327,7 @@
if (autocomplete_data.delimiter.length > 0) {
delim = String.fromCharCode(autocomplete_data.delimiter[0]);
}
- ed.selection.setContent(autocomplete_data.trigger + current.text() + delim);
+ ed.selection.setContent(autocomplete_data.trigger + current.toString() + delim);
// insert the enclosing text if it has not already been added
if (autocomplete_data.enclosing.length > 0 && !closingTextExists(content, currentNode)) {

0 comments on commit f13ed60

Please sign in to comment.