Commit Graph

621 Commits

Author SHA1 Message Date
Kevin Sawicki
19aa192c47 Return paths instead of deferred from project.getFilePaths
It was already being performed synchronously
2012-10-12 14:45:18 -07:00
Kevin Sawicki
38802ba287 Use javscript.tmbundle commit 2f95d9ae92
The commit after this one breaks syntax highlighting
for the lines after a single line comment
2012-10-12 11:34:44 -07:00
Corey Johnson
75d7950ef5 Fix linemap translation when an atomic token is at the end of a line.
Previously, if you entered an atomic token (like a tab) on an empty line it would not position the cursor after the token. This commit fixes that.

If the last screen line token is atomic, and screenLine.translateColumn's sourceColumn parameter is greater than the start position of the atomic token, then the translated column should be the end position of the atomic token.
2012-10-10 14:45:47 -07:00
Corey Johnson
8eb9d6629c Remove unused methods from token.
The refactoring of Editor.buildLineHtml removed the need for these methods
2012-10-10 14:45:46 -07:00
Kevin Sawicki
f694d1d2c8 Update ruby bundle to commit 77dc5d13cc 2012-10-10 13:48:46 -07:00
Kevin Sawicki
6dc5a05f35 Expect var to have modifier class instead of type
This changed in the underlying JavaScript bundle
2012-10-09 17:55:21 -07:00
Kevin Sawicki
2aa3667586 Update expected var selector to storage.modifier.js
This changed in the underlying JavaScript bundle
2012-10-09 17:49:53 -07:00
Kevin Sawicki
1694f74bcb Expect var to be a storage.modifier.js type in spec 2012-10-09 17:46:26 -07:00
Kevin Sawicki
8b61e6a9df Split out file and directory callbacks 2012-10-09 17:41:32 -07:00
Corey Johnson
701631e7cb Update spec to use new ruby scopes 2012-10-09 17:23:01 -07:00
Corey Johnson
6b5c3dc1cf Remove unused variable that causes specs to fail 2012-10-09 17:23:00 -07:00
Corey Johnson
7afbac5a4e Merge branch 'transpose' 2012-10-09 11:03:26 -07:00
Corey Johnson
a2f2e388d5 Test 💄
Instead of inserting text into an existing buffer, I replaced all text in the buffer to make the test easier to understand.
2012-10-09 11:02:39 -07:00
Will Farrington
4b3505d9b5 Disable buffer modified indicator if buffer content matches content on disk 2012-10-08 17:55:35 -10:00
Chris Wanstrath
f5f18abbf0 ctrl-t: transpose 2012-10-08 20:08:07 -07:00
Will Farrington
214735f1d7 add some specs for buffer modified indicator 2012-10-07 09:48:46 -10:00
Nathan Sobo
eae7fcdd97 Fix breaking due to "root-view:" prefixed events 2012-10-05 10:07:37 -10:00
Nathan Sobo
9906dd41b4 Give editor-specific events the "editor:" prefix 2012-10-05 10:07:37 -10:00
Kevin Sawicki
c30220ae80 Uncomment lines that match non-whitespace prefix of comment regex 2012-10-04 15:37:28 -07:00
Kevin Sawicki
b7f32036c2 Change editor-selection-change event name to selection-change 2012-10-01 15:44:58 -07:00
Kevin Sawicki
edfd61c702 Remove unneeded class addition 2012-10-01 15:44:58 -07:00
Kevin Sawicki
41cdf130fb Update highlighted line when editor selection changes 2012-10-01 15:44:58 -07:00
Kevin Sawicki
c7361d487f Update cursor line when selection screen range changes 2012-10-01 15:44:58 -07:00
Kevin Sawicki
2bea67057b Add spec for line highlight after backspace 2012-10-01 15:44:58 -07:00
Kevin Sawicki
f2306f444a 💄 2012-10-01 15:44:58 -07:00
Corey Johnson
887720e4de [fail] added failing gutter spec
When you remove a newline with backspace, the background on the gutter line number isn't highlighted. This is to help @kevinsawicki debug the problem.
2012-10-01 15:44:58 -07:00
Corey Johnson
9361b0717c Give gutter line highlighting its own describe 2012-10-01 15:44:58 -07:00
Kevin Sawicki
e039dab0f6 Don't highlight line in mini editor 2012-10-01 15:44:57 -07:00
Kevin Sawicki
a03512fd90 Add line number padding to expected width 2012-10-01 15:44:57 -07:00
Kevin Sawicki
a4ad5829a5 Disable gutter background highlight on multiline selections 2012-10-01 15:44:57 -07:00
Kevin Sawicki
33abaff747 Don't highlight line if selection is multiline 2012-10-01 15:44:57 -07:00
Kevin Sawicki
12a30873cf 💄 2012-10-01 15:44:57 -07:00
Kevin Sawicki
d69e08a858 Use screen rows for line highlight 2012-10-01 15:44:57 -07:00
Corey Johnson & Kevin Sawicki
e15694bb41 No longer cache cursorScreenRow in gutter highlighting 2012-10-01 15:44:57 -07:00
Corey Johnson & Kevin Sawicki
2863d92ce3 Use screen position for gutter highlighting 2012-10-01 15:44:57 -07:00
Kevin Sawicki
6412cde7a8 Support guide column callback function
This allows a config function to be registered
in the atom.coffee file to support different wrap
guide columns depending on the type of file being
viewed.
2012-09-29 11:44:05 -07:00
Nathan Sobo
4e49fbec72 TextMate grammars can include other grammars 2012-09-28 17:28:40 -06:00
Nathan Sobo
3a8fe2b24e Spans have a class for each dot-separated portion of their token's scope
Previously, we were rendering every prefix of the dot-separated scope as its own class. So the scope meta.delimiter.method.period.coffee would make a token w/ classes:

class="meta, meta-delimiter, meta-delimiter-method, meta-delimiter-method-period…"

Now we just give the token each piece of the scope as a class:

class="meta delimiter method period coffee"

We lose a bit of meaning, in that a scope selector method.period.coffee would match this element in CSS even though it *wouldn't* in TextMate. But we also gain the behavior where longer prefixes are more specific by naturally producing more specific css selectors. So '.meta.delimiter.method' is always more specific than '.meta.delimiter', whereas '.meta-delimiter-method' ties with '.meta-delimiter'. 

If prefix ambiguities become a problem later we may need to revisit this approach, but I think it's good enough for now.
2012-09-28 17:00:31 -06:00
Nathan Sobo
5ad6c67e07 Round alpha channel in TextMate theme rgba colors to 2-decimal places 2012-09-28 16:43:02 -06:00
Nathan Sobo
4ba5ccb0fa Properly translate hex colors from TextMate themes to rgba (divide alpha by 255) 2012-09-28 14:06:10 -06:00
Nathan Sobo
3ebd7cfef1 Output nested spans so that scope selector specificity translates better to CSS
The tokenizer emits individual tokens with arrays of scopes, rather than a more tree-like structure. It's debatable whether we want to emit scope trees rather than token streams in general, though that might complicate things like line wrapping. For now, we're reconstructing the tree during rendering based on information that's implicit in the tokens.
2012-09-28 13:36:43 -06:00
Corey Johnson & Nathan Sobo
bebfaed69b wip: creating token spans 2012-09-28 13:36:43 -06:00
Kevin Sawicki
02fa815459 Highlight the line number of the current cursor row 2012-09-28 09:52:34 -07:00
Corey Johnson & Nathan Sobo
82cecbf042 Add test for situation where we infinitely looped 2012-09-28 09:05:51 -07:00
Corey Johnson
f95e67d8cd Triple click selects entire line (including \n). Fixes #44 2012-09-26 13:53:51 -07:00
Nathan Sobo
2dbba203a0 Allow begin/end rules with back-references to be nested 2012-09-26 12:10:00 -06:00
Nathan Sobo
9c8d897317 Start on a spec for nested begin/end rule w/ back-references in the end rule 2012-09-26 09:59:15 -06:00
Nathan Sobo
2d38650265 Linguistic 💄 2012-09-26 09:57:35 -06:00
Corey Johnson
dd81e69bfb Merge branch 'master' of https://github.com/github/atom 2012-09-25 17:24:23 -07:00
Nathan Sobo
1d9cc53e7f RootView focuses the *first* focusable child.
This prevents an issue where the fuzzy finder's mini-editor would get focused again when the fuzzy finder was being hidden.
2012-09-25 17:38:48 -06:00