Commit Graph

14143 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
a72d0399f7 Add Editor.setShowInvisibles and remove showInvisibles from EditSession 2012-10-18 14:10:36 -07:00
Corey Johnson & Nathan Sobo
ae0a60f4a9 Eliminate unused showInvisibles parameter. 2012-10-18 11:52:51 -07:00
Corey Johnson & Nathan Sobo
b33bbbfc0d Handle invisible character rendering when building HTML for lines.
Not during creation of tokens.
2012-10-18 11:43:17 -07:00
Corey Johnson & Nathan Sobo
dd5a10e82e 💄 2012-10-18 11:33:19 -07:00
Corey Johnson
d7bc03112b Empty lines require a special case for invisibles. 2012-10-18 11:33:19 -07:00
Corey Johnson
1ffbff7d99 Fix newline invisible symbol 2012-10-18 11:33:19 -07:00
Corey Johnson
22e009a999 Set invisible values for spaces and tabs when initial tokenization occurs.
Also break whitespace into its own token just like tabs.
2012-10-18 11:33:19 -07:00
Corey Johnson
4478bbca9a When project.showInvisibles is true; spaces, tabs and newlines are visible 2012-10-18 11:31:39 -07:00
Corey Johnson
e2a917fcf3 Change tabText to tabLength 2012-10-18 11:31:39 -07:00
Corey Johnson & Nathan Sobo
640e9b6b0d Editor.scrollTop can't be assigned to a negative number.
This was possible when the verticalScrollbar's scrollHeight was smaller than its height.
2012-10-17 18:02:45 -07:00
Corey Johnson & Nathan Sobo
4987ea3e49 If a TextMate syntax/preference fails to parse, catch error and log warning 2012-10-17 13:53:55 -07:00
Corey Johnson & Nathan Sobo
9f71b3057c Simplify ScreenLine.translateColumn 2012-10-16 17:08:10 -07:00
Corey Johnson & Nathan Sobo
253a07e2c4 Add comment explaining the need for appending \n when scanning lines with a TextMate grammar 2012-10-16 16:07:54 -07:00
Corey Johnson
6171ea33e1 Add support for TextMate grammars with newlines in their regexes 2012-10-16 15:58:11 -07:00
Kevin Sawicki
6551be0c85 Update the buffer being used when the editor path changes
Previously the status indicator would only work for the first
buffer open since only the buffer used when the extension was
initialized was subscribed to for change events.
2012-10-12 15:39:52 -07:00
Kevin Sawicki
0da869589e Use change event instead of buffer-change event
This will update the modified indicator after operations
are undone
2012-10-12 15:08:01 -07:00
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
5bf951d96f Create ScrollView super class
Binds support for page up, page down, move to top,
and move to bottom in the initialize method.
2012-10-12 09:21:35 -07:00
Kevin Sawicki
220044c8bd Add eachBuffer helper to RootView
This allows extensions to bind a callback to all current
and future buffers.
2012-10-12 09:16:53 -07:00
Kevin Sawicki
ae7c5b0fda Support core up/down events in markdown preview view 2012-10-11 14:13:58 -07:00
Kevin Sawicki
24777da703 Remove unneeded onEditor method 2012-10-10 19:16:57 -07:00
Kevin Sawicki
50b1814308 Change => to -> 2012-10-10 18:45:36 -07:00
Kevin Sawicki
d4aeb1bb95 Move EditorCommand helpers elsewhere
RootView and Editor now have helpers that support
binding events to callbacks, binding a callback to
all current and future editors, and replacing the
selected text via a transforming callback.
2012-10-10 18:41:20 -07:00
Kevin Sawicki
1fa32c48e7 Invoke onEditor on each extension sub-class 2012-10-10 18:02:49 -07:00
Kevin Sawicki
e87cb34d1d Support selecting inserted text 2012-10-10 18:02:48 -07:00
Kevin Sawicki
ceb496e202 Use closure wrapper with current event name 2012-10-10 18:02:48 -07:00
Kevin Sawicki
863f9f36fb Rename editSelectedText to replaceSelectedText 2012-10-10 18:02:48 -07:00
Kevin Sawicki
d93a142263 Rename alterSelection to editSelectedText 2012-10-10 18:02:48 -07:00
Kevin Sawicki
2d8be51e71 Add initial editor command super class
This can be extended by extensions targetted
towards acting on text inside the editor and
not contributing any UI
2012-10-10 18:02:48 -07:00
Kevin Sawicki
b3ce062be9 Add up/down event support for keybindings view 2012-10-10 17:41:14 -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
a1f9e061bc Remove native.list
Use native.traverseTree instead from fs.list
and fs.listTree
2012-10-09 17:41:33 -07:00
Kevin Sawicki
7fd06c8e66 Remove logging of traversal times 2012-10-09 17:41:33 -07:00
Kevin Sawicki
d8ea07468b Include FTS_PHYSICAL when calling fts_open 2012-10-09 17:41:33 -07:00
Kevin Sawicki
8b61e6a9df Split out file and directory callbacks 2012-10-09 17:41:32 -07:00
Kevin Sawicki
71c161d527 Remove unneeded regex matching for built-in ignores 2012-10-09 17:41:32 -07:00
Kevin Sawicki
51a41a9a72 Add native traverseTree 2012-10-09 17:41:32 -07:00
Kevin Sawicki
8ce6810179 Support bundles with foldingStopMarker under Preferences/ 2012-10-09 16:57:43 -07:00
Corey Johnson
7afbac5a4e Merge branch 'transpose' 2012-10-09 11:03:26 -07:00
Kevin Sawicki
37f454aece Support core up/down events in preview list 2012-10-09 10:41:57 -07:00
Will Farrington
d5b0e7acd2 memoize Buffer @contentOnDisk so we don't re-read the whole file on every buffer-change event 2012-10-08 18:17:15 -10:00
Will Farrington
4b3505d9b5 Disable buffer modified indicator if buffer content matches content on disk 2012-10-08 17:55:35 -10:00
Will Farrington
7dd69cfecd Merge remote-tracking branch 'origin/master' into status-bar-buffer-modified-indicator 2012-10-08 17:38:55 -10:00
Chris Wanstrath
602f4ee233 trigger buffer-change after the change, not before 2012-10-08 20:28:18 -07:00
Chris Wanstrath
fa10a8e6ac use the local selection instance 2012-10-08 20:13:16 -07:00
Chris Wanstrath
f5f18abbf0 ctrl-t: transpose 2012-10-08 20:08:07 -07:00
Kevin Sawicki
7fc362c801 Prune paths that are files
This avoids an extra call to isDirectory for each path
that has already been determined to be a file and
therefore not a directory.
2012-10-08 12:10:49 -07:00
Kevin Sawicki
7ab088df8b Check recurse flag before verifying path is directory
Avoid an unnecessary native call if recursing into the current
path has already been avoided.
2012-10-08 11:47:48 -07:00
Will Farrington
09024e0dc8 Merge remote-tracking branch 'origin/master' into status-bar-buffer-modified-indicator 2012-10-07 09:13:08 -10:00