Commit Graph

265 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
fd152ef2a9 When a fold is created inside an existing fold, don't trigger change events or update line map. 2012-06-02 09:21:06 -07:00
Corey Johnson & Nathan Sobo
2f435e08f3 Add regression test for "can't create multiple folds over same region".
Am I using the term regression test correctly?
2012-06-02 08:56:02 -07:00
Corey Johnson
ca4371d9ce The solution to all build problems 2012-06-01 15:35:38 -07:00
Nathan Sobo
58c082445b Merge branch 'master' of github.com:github/atom 2012-06-01 14:01:44 -06:00
Nathan Sobo
74bd510e75 💄 rename ScreenLineFragment to ScreenLine
These objects always span an entire screen line now that we do line-wise folding
2012-06-01 14:01:33 -06:00
Corey Johnson
30d07fd1a0 Rename Buffer.numLines to Buffer.getLineCount 2012-06-01 11:25:58 -07:00
Nathan Sobo
37d423fb60 Fix broken build :-/ 2012-06-01 12:22:54 -06:00
Nathan Sobo
5b20bfd994 Method name 💄 for Highlighter 2012-06-01 12:15:26 -06:00
Corey Johnson
5a0eb5814d We are using scrollTop instead of -wekbit-transform, update specs to reflect this. 2012-06-01 11:06:14 -07:00
Corey Johnson
6952e09646 Moved font-size back to 'px' and fixed specs 2012-06-01 11:06:13 -07:00
Corey Johnson
2623724fd4 Add fold-all event to editor 2012-06-01 11:06:13 -07:00
Nathan Sobo
9cb067f162 Enable auto-indent for 1 more spec + 💄 2012-05-31 18:22:54 -06:00
Nathan Sobo
502208dcf4 Enable auto-indent for spec 2012-05-31 18:17:39 -06:00
Nathan Sobo
9f5a7ceefe Merge branch 'master' into structural-folding 2012-05-31 18:05:13 -06:00
Nathan Sobo
645f57bb40 Merge branch 'master' of github.com:github/atom 2012-05-31 17:49:31 -06:00
Nathan Sobo
acb01bba37 Correctly render lines when destroying a fold forces an autoscroll 2012-05-31 17:48:50 -06:00
Corey Johnson
4f5a03ee4d Merge branch 'master' into structural-folding 2012-05-31 16:24:01 -07:00
Corey Johnson
1a9566d954 Merge branch 'master' into binding-viewer 2012-05-31 15:55:23 -07:00
Corey Johnson
b03230cc6c Move auto indent/outdent to selection spec 2012-05-31 13:57:04 -07:00
Corey Johnson
516de1ede1 Merge branch 'master' into structural-folding 2012-05-31 11:46:23 -07:00
Corey Johnson
2df7c26353 Folding works with coffeescript 2012-05-31 11:30:06 -07:00
Nathan Sobo
fdb8ba8a2b Remove redundant gutter spec. Corey's is in a better spot. 2012-05-31 12:13:36 -06:00
Nathan Sobo
06fffe6c4b Merge branch 'master' of github.com:github/atom
Conflicts:
	src/app/editor.coffee
2012-05-31 12:11:07 -06:00
Nathan Sobo
c901417a19 When lines are added, remove any that get pushed down to exceed the max allowed row
This fixes issues where unfolding or pasting caused rendering artifacts below the last visible row.
2012-05-31 12:06:00 -06:00
Corey Johnson
17c0526bc3 Add test for gutter rendering of fold lines 2012-05-31 10:26:34 -07:00
Nathan Sobo
39fb14e5f5 Add a spec for line number updates after folding/unfolding 2012-05-31 10:57:04 -06:00
Nathan Sobo
6c64d2a13b spec 💄 2012-05-31 10:46:00 -06:00
Corey Johnson
17b50ee8dc Folds include their first line 2012-05-30 16:55:15 -07:00
Corey Johnson
42e743f44a Renderer.toggleFold works for folded, foldable and non-foldable lines
When a line is not foldable, we search upward for a suggested fold that contains it and apply that fold instead. If called with a row that is already folded, it unfolds it.
2012-05-30 16:29:45 -07:00
Corey Johnson
76f5d35eb9 Add toggle-fold event to editor 2012-05-30 15:43:21 -07:00
Corey Johnson & Nathan Sobo
63a87fd83e Renderer.createFoldAtBufferRow uses the fold suggester to determine which syntactic region to fold 2012-05-30 16:02:06 -06:00
Corey Johnson & Nathan Sobo
84318277ba FoldSuggester can return a row range of a foldable syntactic region starting at a given row 2012-05-30 16:01:21 -06:00
Corey Johnson & Nathan Sobo
e10383a9e9 Add Highlighter.findClosingBracket
Takes a position, and finds the position of the closing bracket that matches the opening bracket at that position. Only works with curly-braces for now.
2012-05-30 15:58:59 -06:00
Corey Johnson & Nathan Sobo
51ec8b4ca2 💄 2012-05-30 15:57:03 -06:00
Corey Johnson & Nathan Sobo
8a77a740f5 Renderer indicates when a screen line starts a foldable region 2012-05-30 12:27:01 -06:00
Corey Johnson
893564945e Add rootView.activeKeybindings().
This will return all active keybindings available for the focused element.
2012-05-29 15:46:38 -07:00
Corey Johnson
64bd26a392 Add Keymap.bindingsForElement method 2012-05-29 14:15:54 -07:00
Nathan Sobo
0ef4c7e172 Only re-render the gutter when we render new lines 2012-05-29 15:12:11 -06:00
Nathan Sobo
3e26386f98 Always re-render gutter from the first rendered to the last rendered screen row 2012-05-29 14:51:19 -06:00
Nathan Sobo
0700aba67f All specs pass again with overdraw 2012-05-29 13:39:13 -06:00
Nathan Sobo
6e34124f12 Overdraw gutter line numbers in addition to editor lines 2012-05-29 13:07:24 -06:00
Nathan Sobo
a9c9a854ac Only truncate change ranges to the last visible row if the last rendered row is smaller
This happens, for example, when the entire buffer is shorter than the number of rows on screen. In this case, the last rendered row is not smaller than the last possible visible row.
2012-05-29 13:03:29 -06:00
Nathan Sobo
c00c3317f0 Down to 2 failures by truncating change ranges to the range of the current rendered lines 2012-05-29 12:52:39 -06:00
Nathan Sobo
e9a67208e6 Adjust otherwise-passing spec for overflow 2012-05-29 11:50:54 -06:00
Nathan Sobo
8fba4ff935 Fix some off by one errors in the overdraw calculations 2012-05-26 13:52:48 -07:00
Nathan Sobo
328aa3ba6b WIP: Redoing overdraw code… it's broken 2012-05-26 13:05:25 -07:00
Nathan Sobo
351c283ed6 Merge branch 'master' into overdraw 2012-05-25 13:13:06 -07:00
Nathan Sobo
e2ca3814a9 Hide the cursor when it is on a fold line 2012-05-25 12:35:32 -07:00
Corey Johnson & Nathan Sobo
35b2f0e8c7 Buffer changes updates a stable list of folds 2012-05-25 11:05:45 -07:00
Corey Johnson & Nathan Sobo
f8c3d89e60 When folds are selected they are highlighted 2012-05-24 16:39:14 -07:00