Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix @insert_character: don't assume at cursor
[peach-html5-editor.git]
/
editor.coffee
diff --git
a/editor.coffee
b/editor.coffee
index
9f6d8eb
..
60ea832
100644
(file)
--- a/
editor.coffee
+++ b/
editor.coffee
@@
-1378,8
+1378,7
@@
class PeachHTML5Editor
return false
# after calling this, you MUST call changed() and adjust_whitespace_style()
insert_character: (n, i, char) ->
return false
# after calling this, you MUST call changed() and adjust_whitespace_style()
insert_character: (n, i, char) ->
- return if @cursor.n.parent is @tree_parent # FIXME implement text nodes at top level
- parent = @cursor.n.parent
+ return if n.parent is @tree_parent # FIXME implement text nodes at top level
# insert the character
if @insert_should_replace n, i
n.text = char
# insert the character
if @insert_should_replace n, i
n.text = char