Commit Graph

1027 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
045c3c39bf Render empty lines correctly when inserting newlines 2012-01-25 13:36:32 -08:00
Corey Johnson & Nathan Sobo
c536933c0b Newline chars can be inserted into the buffer. 2012-01-25 12:58:36 -08:00
Corey Johnson & Nathan Sobo
430869b7e0 Show inspector with javascript 2012-01-25 12:29:36 -08:00
Corey Johnson & Nathan Sobo
c11a618a9f X and Y were inverted 2012-01-25 12:20:58 -08:00
Corey Johnson & Nathan Sobo
0528a7b8cb 💄 2012-01-25 10:37:19 -08:00
Corey Johnson & Nathan Sobo
3317afb695 Make @edtior a field on Cursor 2012-01-25 10:28:50 -08:00
Corey Johnson & Nathan Sobo
e192bc7350 cursor has an @editor method instead of referring to @parentView a lot
Punt on making a field since @parentView is null when Cursor.initialize
is called.
2012-01-25 09:47:53 -08:00
Corey Johnson & Nathan Sobo
f6ec9daf39 Rename col/row to x/y 2012-01-25 09:35:33 -08:00
Nathan Sobo
92f7b51cd4 💄 2012-01-24 18:14:44 -08:00
Nathan Sobo
9d911d29c5 Bug fix: Editor retains focus when clicked while already focused
I couldn't find a way to test this really. It's some interaction
between focusout and focus events. When the hidden input has focus and
then we call focus on the editor, the handling of the focusout event
away from input was trigerring a call to focus on the editor, which
didn't seem to trigger the handler that shifted it back to the hidden
input. Here I only focus the editor if something *outside* of the
editor was de-focused. So focusing the editor when the input is focused
is ignored, and focus is gracefully returned back to the input.
2012-01-24 18:14:38 -08:00
Corey Johnson & Nathan Sobo
90656aaffb 💩 2012-01-24 17:30:40 -08:00
Corey Johnson & Nathan Sobo
0fe70f0920 Focus Editor on DOM attachement 2012-01-24 17:26:38 -08:00
Corey Johnson & Nathan Sobo
b4d91f2bc7 Typing inserts a character at the cursor position 2012-01-24 17:19:01 -08:00
Corey Johnson & Nathan Sobo
4ca3bbdbca Fix fileFinder test 2012-01-24 15:29:33 -08:00
Corey Johnson & Nathan Sobo
6af33c3337 Editor directs focus to a hidden input element.
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 ü
2012-01-24 15:27:05 -08:00
Nathan Sobo
18f09aad9e 💄 2012-01-24 14:21:43 -08:00
Corey Johnson & Nathan Sobo
c0e49a3e6c Css uses correct path 2012-01-23 17:30:55 -08:00
Corey Johnson & Nathan Sobo
10bf803fe0 Make tests green
Some need to be disabled because they rely on ace. Others fixed. Others
deleted.
2012-01-23 17:28:16 -08:00
Corey Johnson & Nathan Sobo
5ddf4e1a0b Ensure combined scroll margins are smaller than editor height.
This prevents jerky scrolling when the window is very short.
2012-01-23 17:15:11 -08:00
Corey Johnson & Nathan Sobo
1a52890d19 Cursor scrolls editor as it moves 2012-01-23 16:45:00 -08:00
Corey Johnson & Nathan Sobo
81fc69120f Retain goal column when moving up on first line.
Also: Respect a goal column of 0 when moving down on last line and then
back up. (Unlike TextMate)
2012-01-23 14:56:30 -08:00
Corey Johnson & Nathan Sobo
101d20692d Don't nuke goalColumn when moving down on last line 2012-01-23 14:37:03 -08:00
Corey Johnson & Nathan Sobo
713615d515 Retain goal column when moving cursor up. 2012-01-23 14:18:34 -08:00
Corey Johnson & Nathan Sobo
5f058e690c Goal column is cleared when not moving vertically
This allows left/right movements to choose a new goal.
2012-01-23 13:58:26 -08:00
Corey Johnson & Nathan Sobo
1dcebbae45 WIP: Use a goal column when moving down
Still needs to be cleared when moving horizontally.
2012-01-23 13:40:37 -08:00
Corey Johnson & Nathan Sobo
7d4c236418 💄 2012-01-23 13:12:51 -08:00
Corey Johnson & Nathan Sobo
3d45a5201d Move movement logic to cursor subview. 2012-01-23 12:50:07 -08:00
Danny Greg & Nathan Sobo
98947877e5 Properly html escape rendered text in editor and render empty lines. 2012-01-19 19:08:40 -08:00
Danny Greg & Nathan Sobo
62d8aa72e2 Merge branch 'master' into editor 2012-01-19 18:54:34 -08:00
Danny Greg & Nathan Sobo
0e9bfe4d1a Builder has class methods for every tag
Shorthand: If you know the top-level tag you want to render, you can
call `Builder.div class: "foo", -> ...` instead of calling render.
2012-01-19 18:54:09 -08:00
Danny Greg & Nathan Sobo
aec88e3404 Add Builder.render and instance methods for tags
Builder.render takes a function that calls tag methods and returns a
view fragment.
2012-01-19 18:30:32 -08:00
Danny Greg & Nathan Sobo
616a47d9dc Render cursor's   with a raw call 2012-01-19 17:03:17 -08:00
Danny Greg & Nathan Sobo
81c2faf529 Merge branch 'master' into editor 2012-01-19 16:49:48 -08:00
Danny Greg & Nathan Sobo
fe582d7cd7 Proxy raw from template to builder. 2012-01-19 16:49:42 -08:00
Danny Greg & Nathan Sobo
7d0c5ff2f0 Merge branch 'master' into editor 2012-01-19 16:47:12 -08:00
Danny Greg & Nathan Sobo
5e41f82985 Add a raw call to builder. 2012-01-19 16:46:32 -08:00
Danny Greg & Nathan Sobo
597e4c54b2 Merge branch 'master' into editor 2012-01-19 16:37:58 -08:00
Danny Greg & Nathan Sobo
660beb9f65 Text inside of tags is HTML escaped. 2012-01-19 16:36:32 -08:00
Danny Greg & Nathan Sobo
030e241c75 Don't spill out of document when moving right and left 2012-01-19 15:40:26 -08:00
Danny Greg & Nathan Sobo
a606fe55b3 Keep cursor inside the lines when moving. 2012-01-19 14:39:16 -08:00
Danny Greg & Nathan Sobo
cd127c009e Cursor can move around screen
Still not handling corner cases like moving off the edge of screen,
line, etc.
2012-01-17 18:13:50 -08:00
Nathan Sobo
5198a88cce Half-baked: Have a lines reasonably looking cursor working.
A bunch of tests are failing but you can load a buffer and display its
lines.
2012-01-16 22:11:38 -08:00
Nathan Sobo
4274ff4a81 Merge branch 'master' into editor 2012-01-16 21:28:31 -08:00
Nathan Sobo
ba2ed50e87 Also trigger 'attach' on subviews when parent view is attached. 2012-01-16 21:28:18 -08:00
Nathan Sobo
a051e452ea Merge branch 'master' into editor 2012-01-16 21:17:51 -08:00
Nathan Sobo
5dbdd92e6c When views are attached to dom, trigger 'attach' events
Added this mechanism by augmenting jQuery dom mutation methods. It will
only trigger an event if the element has a truthy value for the
'triggerAttach' data entry. This will allow us to execute actions that
require the view to be physically on the dom at the appropriate time.
2012-01-16 21:15:57 -08:00
Nathan Sobo
bde3a9f5f5 Use requireStylesheet for editor stylesheet. 2012-01-16 20:17:07 -08:00
Nathan Sobo
1a16a755b4 Merge branch 'master' into editor
Conflicts:
	spec/spec-helper.coffee
2012-01-16 20:04:50 -08:00
Nathan Sobo
f4aa8daa52 Add window.requireStylesheet
This allows you to synchronously load a stylesheet into the document's
head whenever it is needed.
2012-01-16 20:03:48 -08:00
Nathan Sobo
7d7b119927 WIP 2012-01-16 19:23:27 -08:00