JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
implement keys: home, end
[peach-html5-editor.git] / editor.coffee
index 1b2503e..785615c 100644 (file)
@@ -917,6 +917,9 @@ class PeachHTML5Editor
                                                @move_cursor new_cursor
                                return false
                        when KEY_END
+                               new_cursor = last_cursor_position @tree
+                               if new_cursor?
+                                       @move_cursor new_cursor
                                return false
                        when KEY_BACKSPACE
                                return false unless @cursor?
@@ -947,6 +950,9 @@ class PeachHTML5Editor
                        when KEY_ESCAPE
                                return false
                        when KEY_HOME
+                               new_cursor = first_cursor_position @tree
+                               if new_cursor?
+                                       @move_cursor new_cursor
                                return false
                        when KEY_INSERT
                                return false