Entering a /* at the top of the document will cause lines below to be
interpreted as comments. Still needs cleanup. There are some unrelated
failures associated with Buffer.setText not firing events correctly,
which is causing the highlighter to get into an invalid state.
Breaks some specs because the highlighter doesn't update when the
buffer changes. Not loading the ace theme CSS yet, so you can't see any
colors yet either.
Commit 8e77c05c fixed scrolling *up* when clicking the buffer while
scrolled down. But it was still scrolling to the far left when typing /
clicking on a really long line. This commit solves both issues by
always positioning the hidden input to the same location as the cursor,
so it doesn't tell webkit to scroll away from the current focus when it
is focused or the user types.
If a region of the selection needs to span the full line, I assign
right: 0 instead of a width so that it always stretches across the
entire editor, even after a resize.
Before, we were traversing through lines to remove in ascending order
and then calling remove(n) for each. But when we removed line 10, line
11 became the *new* line 10. So when we removed line 11 we ended up
skipping the old line 11. I solved this by traversing in reverse when
we need to delete lines.
Introduce Point and Range objects. Selection.selectRight places an
anchor object before moving right if no anchor yet exists. Still no
visual treatment.
Change takes a range and a string and replaces the range with the
string, then emits a change event with the range of text that was
changed, the range of text occupied by the new string, and the string
itself. This can be used to implement backspace, insert, as well as
various cut and paste manipulations.
Now we'll be able to listen for textInput events, which give us better
information about what character is being entered in the presence of
multi-keystroke compositions like alt-u,u for ü