Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e63123d
)
fix @insert_character: don't assume at cursor
author
Jason Woofenden
<jason@jasonwoof.com>
Fri, 8 Apr 2016 16:11:10 +0000
(12:11 -0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Fri, 8 Apr 2016 16:11:10 +0000
(12:11 -0400)
editor.coffee
patch
|
blob
|
history
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