Commit Graph

1340 Commits

Author SHA1 Message Date
Corey Johnson
404ca89767 Uncomment the custom event handling code 2012-03-01 15:45:49 -08:00
Corey Johnson
e874512284 Move atom.native to $native 2012-03-01 15:44:36 -08:00
Corey Johnson
e51f49f6f5 Deal with key-equivalents before we send events to Cef 2012-03-01 15:37:58 -08:00
Corey Johnson
5f64dba5bf Clean Xcode project 2012-03-01 15:37:17 -08:00
Corey Johnson
7fc98e0ae3 Use NSURL.path to get the filename from openDialog 2012-03-01 15:36:05 -08:00
Corey Johnson
a7c835ec6e 💩 2012-03-01 15:35:23 -08:00
Corey Johnson
cbb4bc06c2 remove webkit frameworks 2012-03-01 15:34:24 -08:00
Corey Johnson
15acd071ca Add keycap (and bound meta-o) to App 2012-03-01 12:11:45 -08:00
Corey Johnson
1e6a34db81 Added native.openDialog 2012-03-01 12:11:17 -08:00
Corey Johnson
bd17d890a1 If no windows are open, keydown events are sent to the shared context. 2012-03-01 12:11:04 -08:00
Corey Johnson
569bed9ee1 Refactor ad hoc delegate methods into BrowserDelegate protocol. 2012-02-29 17:30:50 -08:00
Corey Johnson
670b9dc52d meta-r reloads a controller 2012-02-29 17:26:50 -08:00
Corey Johnson
f32e5ac716 Fat arrow needed for keydown events 2012-02-29 15:32:53 -08:00
Corey Johnson & Nathan Sobo
03bc1f38a1 💩 2012-02-29 15:26:55 -08:00
Corey Johnson & Nathan Sobo
7e6132f5b7 Redo Xcode project FROM SCRATCH 2012-02-29 15:23:17 -08:00
Corey Johnson & Nathan Sobo
ffeaf7ed17 Remove menu code and tests 2012-02-29 13:47:48 -08:00
Corey Johnson & Nathan Sobo
bce834aea0 Chrome has a different default charWidth 2012-02-29 13:27:12 -08:00
Corey Johnson & Nathan Sobo
632a2cb64a Stop listening or trigger events from App
It causes DOM errors when you reload.
2012-02-29 12:04:41 -08:00
Corey Johnson & Nathan Sobo
be463abe42 Move keymap from app to window 2012-02-29 11:33:15 -08:00
Corey Johnson & Nathan Sobo
c84320b536 window-bootstrap is called when a file is opened. 2012-02-28 17:24:58 -08:00
Corey Johnson & Nathan Sobo
6a2ac7b25e Fixed Jasmine errors about 'abort not existing on undefined'
I'm not sure why these errors occurred though.
2012-02-28 17:23:55 -08:00
Corey Johnson & Nathan Sobo
4b8bf90a20 Merge remote-tracking branch 'origin/folding' into chrome 2012-02-28 16:07:35 -08:00
Corey Johnson & Nathan Sobo
d9697d6ad1 💄 2012-02-28 13:20:55 -08:00
Corey Johnson & Nathan Sobo
b37b45b4b1 atom variable holds all global state and is shared across contexts. 2012-02-28 13:14:35 -08:00
Corey Johnson
5ac7088423 Reloading page resets JS env 2012-02-28 11:36:45 -08:00
Corey Johnson
b0c5cd6bb3 💄 2012-02-28 11:06:42 -08:00
Corey Johnson
bedc39d137 Close dev tools when window closes. 2012-02-28 11:06:33 -08:00
Corey Johnson
cd3dfa8ad2 Global background page is working. 2012-02-28 10:58:25 -08:00
Corey Johnson
19be5fed04 Clean up Xcode project layout 2012-02-27 17:00:05 -08:00
Corey Johnson & Nathan Sobo
6e46b97a5c Cursor moves correctly between wrapped lines
Added explicit options for controlling line wrapping, and skipping of
atomic tokens to the LineWrap.clipScreenPosition. These are used when
moving right to wrap to the next line.
2012-02-27 16:56:02 -07:00
Corey Johnson
e689d78231 Merge branch 'master' into chrome 2012-02-27 14:09:24 -08:00
Corey Johnson
0845fc15c8 Ignore menu items for now. 2012-02-27 13:57:52 -08:00
Corey Johnson
bc404bfffb Sort highest score first, using (-1,0,1) as the return value. 2012-02-27 13:56:18 -08:00
Corey Johnson
71cab248cf rename listFiles to list 2012-02-27 13:42:54 -08:00
Corey Johnson
58259b009d Remove space from front of absolute. 2012-02-27 13:35:34 -08:00
Corey Johnson
25133fc8d9 Handle copy/paste using $native 2012-02-27 13:08:40 -08:00
Nathan Sobo
f2f401e5a1 Rely on clipScreenPosition in vertical movement methods
Before, we were manually clipping the position of the cursor in
vertical movement methods. Now we can just increment / decrement the
row and the position will be clipped when it is assigned.

Also, changed the definition of clip screen position to always 0 out
the column when the row is negative.
2012-02-27 13:16:21 -07:00
Nathan Sobo
f24a045e11 Cursor can move to last row when lines are wrapped 2012-02-27 13:07:59 -07:00
Nathan Sobo
22305f350f Skip fold placeholders when moving right
This relies on a new `eagerWrap` option to clipScreenPosition which
will wrap positions inside of atomic line fragments (which is what fold
placeholders are) to the end of the fragment rather than the beginning.
It also wraps positions beyond the end of a hard line to the next line,
which means Cursor.moveRight just has to increment the column, then
call clipPosition with eager wrap set to true to get all the correct
behavior.
2012-02-27 12:45:26 -07:00
Corey Johnson
8cbf4331e4 Remove references to OSX from fs.coffee and make fs specs pass. 2012-02-27 11:38:25 -08:00
Nathan Sobo
c2cba8bdcd Add failing spec for rightward movement over folds. 2012-02-27 11:22:20 -07:00
Nathan Sobo
796e24f278 Add Editor.linesForScreenRows and .getScreenLines
These just abstract the line wrapper as the source of the screen lines.
2012-02-27 10:31:37 -07:00
Nathan Sobo
8e107359f3 Changes correctly update cursor position when there are folds 2012-02-24 22:08:34 -07:00
Nathan Sobo
0bc510ab58 Properly translate positions when wrapper and folder are composed
The key was in LineMap.linesForScreenRows. For each screen line, it
concatenates all line fragments (if there are indeed more than 1) that
traverse that line to return a single line fragment representing the
line. The key was to update the buffer delta for that fragment to
always be 1,0. Because the wrapper is treating the folder as if it's
the buffer, the lines it stores in its map need to traverse only a
single "buffer" line (that's a single line after folds are taken into
account). We may need better language than "screen" and "buffer"
because the wrapper treats the folder as the "buffer" but that's
confusing because it isn't.
2012-02-24 21:56:18 -07:00
Nathan Sobo
35f1243d32 Restore LineWrapper.clipScreenPosition version that passes existing tests.
It's still wrong, but I need a test to demonstrate how.
2012-02-24 21:13:34 -07:00
Nathan Sobo
17205cae3f WIP: Working on position translation. Pretty broken right now.
The layered relationship between the line wrapper and the folder is
still not quite ironed out yet. The editor behaves pretty erratically
when text is folded.
2012-02-24 21:05:49 -07:00
Nathan Sobo
33ff32f9a4 Add clipScreenPosition to LineFolder & LineMap 2012-02-24 15:35:28 -07:00
Nathan Sobo
b8ef7685de LineWrapper translates positions correctly with respect to folding. 2012-02-24 14:20:06 -07:00
Nathan Sobo
63be776837 LineFolder emits 'fold' and 'unfold' events 2012-02-24 14:18:55 -07:00
Nathan Sobo
c8c7033550 Rename Cursor.set/getPosition to set/getScreenPosition
Now that buffer positions don't always line up with screen positions, it's important that it's clear which one we're talking about.
2012-02-24 11:53:18 -07:00