Nathan Sobo
39863e4ebe
💄
2012-11-23 10:48:00 -07:00
Nathan Sobo
f466a2eede
Un-F
2012-11-23 10:46:26 -07:00
Nathan Sobo
bcab21709b
Handle changes that straddle or are inside of the invalid regions
2012-11-22 11:02:14 -07:00
Nathan Sobo
48f9f70dd2
Handle changes in the valid region of a partially tokenized buffer
2012-11-22 10:07:24 -07:00
Nathan Sobo
893e7428c6
💄
2012-11-21 18:44:42 -07:00
Nathan Sobo
0fd921bb40
💄 and update specs for async tokenization of invalidated rows
2012-11-21 18:38:39 -07:00
Nathan Sobo
5acd1b6ee3
When a change invalidates subsequent lines, re-tokenize asynchronously
...
This can happen when inserting a quote at the top of the file. It switches all the strings to source and vice versa, throughout the file. This can be very laggy, so it's good to do it asynchronously.
2012-11-21 10:02:52 -07:00
Nathan Sobo
e92d9c5c9d
Reorganize TokenizedBuffer spec
...
It's going to have to cover edge cases in the async tokenization, and the previous structure wasn't going to cut it.
2012-11-21 09:09:08 -07:00
Nathan Sobo
5aba8596a9
Make tokenization synchronous in all specs
...
Disabled some specs that need to make it asynchronous again… will deal with those soon.
2012-11-21 08:22:13 -07:00
Nathan Sobo
69ec6b5441
Add the 'editor:edit-session-removed' event to Editor
2012-11-20 16:03:11 -07:00
Nathan Sobo
e508d73dd4
Always provide the EditSession and its index on EditSession events
2012-11-20 15:49:52 -07:00
Nathan Sobo
4a373a9173
Add 'editor:edit-session-added' event to Editor
2012-11-20 15:43:57 -07:00
Nathan Sobo
056c6c5af2
Add 'editor:active-edit-session-changed' events to Editor
2012-11-20 15:23:30 -07:00
Corey Johnson & Nathan Sobo
53c7ccb297
WIP: Fleshing out specs for async tokenization
2012-11-19 17:11:20 -07:00
Corey Johnson & Nathan Sobo
e52dbb682e
WIP: Perform tokenization in chunks when edit session is shown
2012-11-19 16:50:49 -07:00
Corey Johnson & Nathan Sobo
1cc43adddb
Break out atomic tokens in ScreenLine
instead of TextMateGrammar
...
This paves the way for creating untokenized screen lines that still have leading whitespace and tab characters broken out appropriately.
2012-11-19 15:44:24 -07:00
Corey Johnson & Nathan Sobo
f9563f5e55
Fix PathWatcher
failures
...
Now when a file is removed, we always remove its subscriptions and its kevent.
2012-11-19 13:16:14 -07:00
Kevin Sawicki
5da44b9eef
Merge branch 'master' into ignore_git_ignored_paths_in_file_finder
2012-11-19 11:07:30 -08:00
Corey Johnson & Nathan Sobo
bfb1742285
ctrl-a on an empty line stays on that same line.
...
Fixes #95
2012-11-19 10:02:31 -08:00
Kevin Sawicki
9ebcf5a848
💄
2012-11-19 09:49:57 -08:00
Kevin Sawicki
36bf1b0be1
Explicitly set ignored files hidden in spec
2012-11-19 09:46:35 -08:00
Kevin Sawicki
34e5e4a65b
Merge branch 'master' into ignore_git_ignored_paths_in_file_finder
2012-11-19 09:17:09 -08:00
Corey Johnson
5841eba1bc
Handle file resurrection :cross:
2012-11-16 16:13:34 -08:00
Corey Johnson
61aecfa58f
Backfill specs for SelectList
2012-11-16 11:34:52 -08:00
Nathan Sobo
a441ddec7c
Make TokenizedBuffer
emit row-oriented change events
2012-11-16 08:57:59 -07:00
Nathan Sobo
f7b1f0521a
Emit row-oriented events from DisplayBuffer
2012-11-16 07:36:36 -07:00
Nathan Sobo
ea2e025400
Simplify DisplayBuffer
's change event handling
2012-11-16 07:36:35 -07:00
Corey Johnson
5bdfc49f3f
Window's title matches TextMate pattern of "#{basename} – #{project.path}"
2012-11-15 17:08:37 -08:00
Corey Johnson
7f999f4a96
Store the RootView's title as a member var instead of on document.title.
...
Now the window title is mocked to remain static when the spec suite is run.
2012-11-15 15:55:37 -08:00
Corey Johnson
d9a3fbd910
BufferSpec doesn't double release buffers
2012-11-15 13:16:12 -08:00
Nathan Sobo
a1cff240b6
Use 'blink-off' css class to blink the cursor when editor is focused
...
Rather than managing the visibility directly, a class makes it easy. The cursors will always be toggling this class on and off in the background, but only on the focused editor will it actually have an effect.
2012-11-14 21:43:06 -07:00
Nathan Sobo
0af952fc13
💄
2012-11-14 21:42:03 -07:00
Nathan Sobo
23ab4c193c
Merge remote-tracking branch 'origin/master' into batch-screen-updates
2012-11-14 20:54:22 -07:00
Nathan Sobo
185ca22488
Make cursor blink by changing CSS visibility with setInterval
...
This is actually more efficient than the CSS animation we were doing previously, because it doesn't force the cursor to be sampled at 60 FPS for something that changes around twice a second.
2012-11-14 20:43:34 -07:00
Nathan Sobo
5dea68bb4c
Status bar only updates modified flag after buffer *stops* changing
2012-11-14 15:34:11 -07:00
Nathan Sobo
4a84c5f8f9
Add 'stopped-changing' event to buffer. Fires 300ms after last change.
...
This will be used by the status bar and other expensive code that needs to respond to the buffer changing, but that we don't want running on every single keystroke when the user is typing quickly.
2012-11-14 15:33:44 -07:00
Nathan Sobo
632bba5609
Kill dead code in spec
2012-11-14 15:13:50 -07:00
Nathan Sobo
3e11b38eaf
Disable spec for cursor idle class. We're going to blink it manually.
2012-11-14 13:13:39 -07:00
Corey Johnson & Nathan Sobo
041dc2b6b0
Replace calls to renderLines
w/ resetDisplay
in Editor
2012-11-13 17:21:27 -07:00
Corey Johnson & Nathan Sobo
cef9ce6ca7
Add needsUpdate
and needsAutoscroll
properties to cursor views
...
Then in the editor, we update and autoscroll only the views that need it. Autoscrolling is suppressed when resetting the display so that we honor the scroll positions of the active EditSession.
2012-11-13 17:20:48 -07:00
Nathan Sobo
55bab0fbe0
Un F
2012-11-13 14:18:12 -07:00
Corey Johnson & Nathan Sobo
b5efec308a
wip: updateDisplay
2012-11-13 12:08:41 -08:00
Corey Johnson & Nathan Sobo
9c0f1d428f
Rename updateAppearance to updateDisplay
2012-11-13 11:21:46 -08:00
Corey Johnson
bb9c2e1bcb
Handle exceptions thrown during do/undo/redo
2012-11-12 15:59:44 -08:00
Corey Johnson
1f7b92495a
fix failing spec
2012-11-09 16:10:53 -08:00
Corey Johnson
f09a104524
Treat $base in textmate grammars as if it is $self
...
$base works as $self worked previously. $self will need to be fixed. If inside
a embedded grammar $self refers to the embedded grammar while $base refers to the
overall grammar.
2012-11-09 15:35:40 -08:00
Nathan Sobo
06204a40dd
Un-F. 2 failures left in suite.
2012-11-09 14:27:19 -07:00
Nathan Sobo
3bc11ede77
Set the lines div height explicitly so it can be > 100% of parent
...
All editor specs pass
2012-11-09 14:25:59 -07:00
Nathan Sobo
c257a989be
Account for 20 extra pixels on right of lines div in spec
2012-11-09 14:05:22 -07:00
Nathan Sobo
0b9e22483e
Update spec to match stricter maintenance of lastRenderedScreenRow
2012-11-09 13:40:49 -07:00
Nathan Sobo
4a3dbedb71
Fix spec to allow for 20 extra pixels to right of the lines
2012-11-09 13:28:51 -07:00
Will Farrington
1ea8df6e60
Add hideIgnoredFiles option to projects
2012-11-09 11:51:00 -08:00
Will Farrington
e13270bcb3
Spike out specs
2012-11-09 11:35:45 -08:00
Corey Johnson & Nathan Sobo
7c16c48e2a
Ensure underlayer and overlayer are always the same width as lines
...
Also… simplify CSS rules for lines element. No display table or padding, instead we just set the min width when typing.
2012-11-09 11:12:33 -07:00
Nathan Sobo
1f94b2aacc
WIP: Handling display buffer changes. Cursor, selection specs failing
...
That's because the new CodeMirror-inspired line update code assumes that lines are the only thing in the rendered lines div.
2012-11-09 08:46:33 -07:00
Nathan Sobo
1d46da55da
WIP: Borrowing from code mirror to update lines. Scrolling / resizing work, but not much else
2012-11-09 07:31:30 -07:00
Corey Johnson
00a26ae4da
Fix how repositories work in TextMate grammars
...
Previously, we treated all grammar repositories as rules, but some
grammars have repositories that are a single pattern. If it is a single
pattern, transform it into a rule with one pattern.
Fix how repositories work in TextMate grammars
Previously, we treated all grammar repositories as rules, but some grammars have repositories that are a single pattern. If it is a single pattern, transform it into a rule with one pattern.
2012-11-08 16:47:36 -08:00
Nathan Sobo
312f64d200
Don't make hidden input a child of Editor's scrollView
...
If the input element is a child of the scroll view, then focusing it can end up changing the scroll position of the view behind our backs. We *only* want to scroll the view via our interface on editor, because a bunch of of special code needs to run when we scroll. We can't just have the browser scrolling that view around willy-nilly.
2012-11-07 19:47:31 -07:00
Nathan Sobo
19c8a39fc8
Don't autoscroll to bottom of buffer on selectAll
2012-11-07 16:01:10 -07:00
Nathan Sobo
144cfadb15
Update selection rendering when font size changes
2012-11-07 14:22:43 -07:00
Nathan Sobo
df392359f9
When font size changes, correctly adjust scrollable height
...
This requires updating the padding of the rendered lines and then adjusting the vertical scrollbar content height before updating any of the rendered lines. This fixes (hopefully all of) the rendering issues when adjusting the font size.
2012-11-07 14:09:31 -07:00
Nathan Sobo
66efc80373
Fix broken spec
2012-11-07 13:05:03 -07:00
Nathan Sobo
d44e116321
Don't highlight the current line unless the selection is empty
2012-11-07 12:11:33 -07:00
Corey Johnson & Nathan Sobo
8184c0248b
Don't store tabLength on EditSession
2012-11-06 11:56:18 -08:00
Corey Johnson & Nathan Sobo
b8beec6f55
Remove foldable from ScreenLine
2012-11-06 11:41:48 -08:00
Corey Johnson & Nathan Sobo
874af0f2bc
Eliminate reference to TokenizedBuffer on EditSession
2012-11-06 11:09:38 -08:00
Corey Johnson & Nathan Sobo
0e0f747764
TokenizedBuffer.setTabLength retokenizes the entire buffer
2012-11-06 10:44:50 -08:00
Corey Johnson & Nathan Sobo
2c14bc7ebd
Optimize breakOutAtomicTokens
2012-11-06 10:44:03 -08:00
Corey Johnson
a63f838cdb
Simplify breakOutAtomicTokens method
2012-11-06 09:39:44 -08:00
Corey Johnson
b85a95eaa1
Make leading spaces atomic (length based on tabLength)
2012-11-06 09:03:54 -08:00
Corey Johnson & Nathan Sobo
89ef3f0f20
Build Token objects in TextMateGrammar. Tokenization-related renames.
2012-11-05 16:03:19 -07:00
Corey Johnson & Nathan Sobo
1ed76383ac
💄
2012-11-05 16:02:36 -07:00
Nathan Sobo
b87d7cd0df
Auto-indent skips cursor over leading whitespace before inserting more
...
This preserves the user's intent to bring the line's total amount of leading whitespace to the desired indent level.
2012-11-05 15:15:00 -07:00
Corey Johnson & Nathan Sobo
7d5377fe04
💄
2012-11-05 12:18:27 -08:00
Kevin Sawicki
c8258894c7
Add Buffer.checkoutHead()
...
Move implementation from Editor
to Buffer for checking out the
HEAD revision of the current path
2012-11-05 11:52:33 -08:00
Kevin Sawicki
830a0b337a
Add ctrl-Z keybinding to checkout HEAD revision
2012-11-03 15:50:50 -07:00
Kevin Sawicki
1019154db6
Add Git.checkoutHead(path)
2012-11-03 15:09:52 -07:00
Kevin Sawicki
d1927e17f1
Set invisibles on editor from rootView
2012-11-02 17:51:23 -07:00
Kevin Sawicki
910ca47a61
Allow setting of invisibles on editor
2012-11-02 17:51:22 -07:00
Kevin Sawicki
6d7fac2bf8
💄
2012-11-02 17:51:22 -07:00
Will Farrington
8dbeb9f3d2
first spike at customizable invisibles characters
2012-11-02 17:51:16 -07:00
Kevin Sawicki
e86495080a
Verify icon text in status label specs
2012-11-02 17:46:14 -07:00
Corey Johnson
25744fcd61
Merge remote-tracking branch 'origin/master'
...
Conflicts:
src/app/status-bar.coffee
2012-11-02 15:53:53 -07:00
Corey Johnson & Kevin Sawicki
3772a4ce1b
Add new status icon to status bar
2012-11-02 15:37:05 -07:00
Corey Johnson & Kevin Sawicki
be533d4342
Add Git.isPathNew(path)
...
Renamed other method to Git.isPathModified
2012-11-02 15:36:35 -07:00
Corey Johnson & Kevin Sawicki
c9f1064d6b
Add Git status indicator to status bar
2012-11-02 15:36:35 -07:00
Nathan Sobo
05d4e41900
Wait longer to update status bar so it never interferes w/ repaint
2012-11-02 16:36:33 -06:00
Corey Johnson
81fc8d417d
Add Git.isModified(path)
2012-11-02 15:35:21 -07:00
Kevin Sawicki
6618e6ac5f
Use /tmp paths for non-repo specs
2012-11-02 15:33:39 -07:00
Kevin Sawicki
7f0091b67e
Use /tmp file for non-repo branch label spec
2012-11-02 15:33:39 -07:00
Kevin Sawicki
90126d1a9b
💄
2012-11-02 15:33:39 -07:00
Kevin Sawicki
f5db2b63d8
Add specs for Git.isIgnored
2012-11-02 15:33:38 -07:00
Kevin Sawicki
a9baf54707
Update git specs for latest libgit2 build
2012-11-02 15:33:38 -07:00
Kevin Sawicki
28db13dbc1
Add specs for status bar branch label
2012-11-02 15:33:37 -07:00
Kevin Sawicki
8e8ab4ff94
Add getPath helper
2012-11-02 15:33:37 -07:00
Kevin Sawicki
cbba58c30e
💄
2012-11-02 15:33:37 -07:00
Kevin Sawicki
b029bacc03
Add initial git specs
2012-11-02 15:33:37 -07:00
Nathan Sobo
3fbf5653c4
Update the status bar asynchronously on cursor move / buffer change
...
This keeps it out of the synchronous path from pressing a key to seeing it inserted on screen.
2012-11-02 15:46:33 -06:00
Nathan Sobo
2c211ba504
Remove ability to associate a binding set with a function
...
This was cool, but it's really hard to optimize the keymap with this feature because we never know if a keystroke will match against a binding set with a function, which will force us to always consider this binding set against every key event.
2012-11-02 13:39:21 -06:00
Nathan Sobo
045cdda41d
Fix cursor line highlight style
2012-11-02 12:16:03 -06:00