Commit Graph

2025 Commits

Author SHA1 Message Date
Nathan Sobo
58450d6a65 Give Buffer only a single observeMarker method
It will fire the callback whenever the marker's head or tail position
changes, and it's up to the subscriber to use the information how they
want to.
2013-02-04 20:35:30 -07:00
Nathan Sobo
852b4c2f8a Merge remote-tracking branch 'origin/dev' into markers 2013-02-04 20:04:01 -07:00
Justin Palmer
7a2a02dacf Merge pull request #227 from github/cut-dat-fat
Reusable styles for common UI elements
2013-02-04 15:39:22 -08:00
Kevin Sawicki
bef965d863 Add line number padding to expected width 2013-02-04 15:35:40 -08:00
Kevin Sawicki
bd88a0de15 Support CSON config file
Use ~/.atom/config.cson as the new default when no
config file exists.

~/.atom/config.json is still the default if they both
exist.
2013-02-04 12:38:00 -08:00
Kevin Sawicki
cd07ec841d Add more window globals and shims in task shell
This allows jQuery to be successfully loaded from a web worker
since it does not have a document or window object by default.

Previously it would log about missing methods and properties.

Closes #228
2013-02-04 11:43:58 -08:00
Nathan Sobo
ead93d0f39 Rename to DisplayBuffer.observeMarkerHeadPosition
When you observe, you get callbacks whenever the screen or buffer
position changes, and you get the new and old position in both 
coordinate types.
2013-02-04 11:32:47 -07:00
Nathan Sobo
44e48d42ea Add Buffer.observeMarkerRange 2013-02-04 11:27:39 -07:00
Kevin Sawicki
84feaf369d Format undefined array values as null 2013-02-04 09:08:00 -08:00
Kevin Sawicki
f65e83fe2a Add spec for converting CSON back to object 2013-02-04 09:08:00 -08:00
Kevin Sawicki
ffc65b3735 Add more CSON specs 2013-02-04 09:08:00 -08:00
Jon Rohan
3cf07d29f3 Changing the if-focused event binding to blur. 2013-02-03 09:01:27 -08:00
Nathan Sobo
bd96db781e Pass old/new buffer and screen positions to marker position observers
This is needed by the snippets package, which needs to know where the
cursor was previously when it moves to decide whether to cancel the
current snippet.
2013-02-02 18:00:35 -07:00
Nathan Sobo
e25d83ccbc Use new addEqualityTester method to employ _.isEqual in specs 2013-02-02 17:58:39 -07:00
Nathan Sobo
d144dd4efe Merge branch 'dev' into better-anchors 2013-02-02 17:03:57 -07:00
Nathan Sobo
94f1630152 Bind window focus and focusout events separately to fix spec 2013-02-02 17:02:07 -07:00
Nathan Sobo
7867d0cb3b Fix spec for 'focused' to 'is-focused' class rename. 2013-02-02 16:55:51 -07:00
Nathan Sobo
abafb541df Merge remote-tracking branch 'origin/dev' into better-anchors 2013-02-02 16:47:09 -07:00
Nathan Sobo
aa076a0bf2 Remove focused specs 2013-02-02 16:45:15 -07:00
Nathan Sobo
80b39ae263 Replace mentions of 'anchor' with 'tail' in selection and its spec 2013-02-02 16:44:13 -07:00
Nathan Sobo
6beee10160 Replace anchor w/ marker in selection destruction spec 2013-02-02 16:41:57 -07:00
Nathan Sobo
12425b796c Tweak specs now that buffer changes don't autoscroll the cursor 2013-02-02 16:34:28 -07:00
Nathan Sobo
e53403718a Tell marker head observers if a move was caused by a buffer change
This is used by cursor to only autoscroll when the marker head is
explicitly moved, so that passive movements caused by buffer insertions
don't trigger autoscrolling.
2013-02-02 16:17:14 -07:00
Nathan Sobo
c865b9f53a Update selection autoscroll specs with 3-valued logic
If autoscroll is true, we center the view on the selection. If false,
we do no autoscrolling at all. And if undefined we autoscroll to the
cursor.
2013-02-02 15:58:35 -07:00
Nathan Sobo
3d8406f5a3 Clip screen positions before translating to buffer positions 2013-02-02 15:07:17 -07:00
Jon Rohan
fa940d0386 Merge pull request #168 from github/window-focused
Atom Window Focused
2013-02-01 17:50:28 -08:00
Jon Rohan
0d2a328dcc making the editor .focused .is-focused for symmetry 2013-02-01 19:23:52 -05:00
Kevin Sawicki
69097bee50 Kill trailing newline and inline empty arrays 2013-02-01 16:20:25 -08:00
Kevin Sawicki
83b6a93684 Add initial CSON pretty printer 2013-02-01 16:15:54 -08:00
Jon Rohan
e54c3d8fbb adding is-focused to body, and styling light ui 2013-02-01 18:40:53 -05:00
Jon Rohan
f62e49d2f4 Adding back the font-weight font-style to tmThemes
We can add this back now because in the default tests we're using a true
monospaced font, not the fake monospace font Inconsolata.
2013-02-01 11:09:12 -05:00
Nathan Sobo
1bbb954239 EditSession specs passing after converting Selection to use markers
Still a bit of a mess though...
2013-01-31 18:26:29 -07:00
Corey Johnson
8e0b6aec40 Longer spec timeout 2013-01-31 15:46:54 -08:00
Corey Johnson
5d95d8bc4e Remove log noise while running tests 2013-01-31 15:16:03 -08:00
Nathan Sobo
628701fd3a Finish converting cursors to use markers.
The model layer works at least… haven't tested the view. Will test out
the view once I get the selection model working.
2013-01-31 15:52:28 -07:00
Nathan Sobo
ec521b3fd3 Add ability to cancel marker head position observations 2013-01-31 14:11:28 -07:00
Nathan Sobo
bc44540b10 Start adding ability to observe marker head positions 2013-01-31 14:00:01 -07:00
Kevin Sawicki
379a4a4d8d Only auto-load .cson and .json keymap files
This now prevents files such as .DS_Store from being loaded as a
keymap where previously all paths were loaded regardless of extension.

Closes #205
2013-01-31 12:03:21 -08:00
Corey Johnson & Kevin Sawicki
8f030cd97e Always calculate dimensions with editor on DOM
Closes #206
2013-01-31 10:31:13 -08:00
Jon Rohan
11c0637220 Not adding a font family when the user doesn't have it set 2013-01-31 10:19:41 -05:00
Nathan Sobo
074c1815d0 Start adding marker methods to DisplayBuffer
Whereas marker methods on buffer take for granted that everything is
in buffer coordinates, methods on the DisplayBuffer offer both
screen and buffer coordinate versions of the marker API.
2013-01-30 22:46:52 -07:00
Nathan Sobo
1d1c613f5b Allow buffer marker head and tail positions to be manipulated 2013-01-30 22:16:08 -07:00
Nathan Sobo
5dd142b966 Allow markers to be created in a reverse orientation
This means that the head of the marker precedes its tail in the buffer.
This will be important if we want to build selections on top of markers.
2013-01-30 21:44:57 -07:00
Nathan Sobo
d8ffdcd6bd Allow markers to be created with just a position
When a marker is created with just a position, it only gets a head
position and has no tail position.
2013-01-30 21:37:57 -07:00
Nathan Sobo
0e67f35748 Start on marker interface in DisplayBuffer 2013-01-30 21:04:52 -07:00
Nathan Sobo
fd99c795b9 Merge remote-tracking branch 'origin/dev' into better-anchors 2013-01-30 20:45:31 -07:00
Nathan Sobo
e02f9cd830 Rename Buffer.createMarker to markRange 2013-01-30 17:41:04 -07:00
Nathan Sobo
dfe0cad217 Replace anchor point/range with a single concept: markers
A "marker" is basically like a persistent selection/cursor composite,
having a head and a tail. The "head" is like the cursor in a selection,
and the "tail" is like the part of the selection that doesn't move. My
goal is for markers to be the only construct used to track regions
in the buffer. I want to replace anchors with them.
2013-01-30 16:52:09 -07:00
Kevin Sawicki
1acf0b870f Support translating points and ranges 2013-01-30 13:49:10 -08:00
Corey Johnson
c650deea01 Merge branch 'font-config' into dev 2013-01-30 13:24:12 -08:00