Commit Graph

52 Commits

Author SHA1 Message Date
Nathan Sobo
b1a5b58fa2 Rename Marker to TextEditorMarker to resolve ambiguity w/ TextBuffer API
We expose both kinds of markers in Atom, and the docs were actually
wrong when we refer to Markers from TextBuffer because it linked to the
TextEditor layer’s Marker implementation. This will clarify the
difference.
2015-11-09 00:35:30 -07:00
Ross Allen
1670357293 Link Gutter::decorateMarker to TextEditor::decorateMarker
`Gutter::decorateMarker` passes its `decorationParams` object through to
`TextEditor::decorateMarker`. Rather than duplicate documentation and
fall out-of-date (as was surfaced in #8920), link the
`TextEditor::decorateMarker` as the canonical docs location.
2015-10-01 10:08:36 -07:00
Nathan Sobo
70bcedba4d Revert "Nix arguments"
This reverts commit f2a017d013.
2015-08-29 12:59:16 -06:00
Nathan Sobo
1dac9eb801 Use imperative voice 2015-08-28 09:42:46 -06:00
Nathan Sobo
f2a017d013 Nix arguments 2015-08-28 09:42:39 -06:00
Nathan Sobo
1160c571a7 Public -> Essential 2015-08-28 09:41:23 -06:00
Nathan Sobo
313eb9e926 🎨 2015-08-28 09:41:13 -06:00
Maxim Sokolov
df2fed2474 📝 Update docs for Gutter::decorateMarker
Docs from TextEditor::decorateMarker related to Gutter
2015-08-28 16:54:15 +03:00
Maxim Sokolov
71c9a4afe7 📝 Add docs for Gutter::destroy 2015-08-28 16:54:14 +03:00
Maxim Sokolov
150300b63e 📝 Make Gutter visibility methods public 2015-08-28 16:54:14 +03:00
Maxim Sokolov
a5edd69ec3 📝 Update docs for Gutter events 2015-08-28 16:54:14 +03:00
Maxim Sokolov
bb447099c0 🎨 Move Gutter event methods up
Need for generated docs
2015-08-28 16:54:14 +03:00
Maxim Sokolov
fbb3bc4232 📝 Make Gutter class extended
Gutter is returned from a public method `TextEditor::addGutter`
2015-08-28 16:54:14 +03:00
Michael Bolin
ec078f9c14 Document return type of Gutter::decorateMarker(). 2015-07-21 22:15:34 -07:00
Jess Lin
cc89f972dc [Gutter][style] Add parentheses to some method calls for readability 2015-04-22 07:28:57 -07:00
Jess Lin
b361e1719c [Gutter] Add decorateMarker method to Gutter model 2015-04-22 07:28:57 -07:00
Jess Lin
a6efa104db [Gutter] Don't allow the 'line-number' gutter to be destroyed 2015-04-22 07:28:56 -07:00
Jess Lin
94a0bf3f90 [Gutter] Create Gutter and GutterContainer w/ API to hide/show 2015-04-22 07:28:56 -07:00
Kevin Sawicki
be0e36b663 Rename Gutter to GutterView
Refs #1468
2014-01-24 17:30:29 -08:00
Nathan Sobo
52dcf6a721 Guard against null line number elements when updating fold indicators
Fixes #1461 but doesn't really address the root cause.
2014-01-22 16:06:46 -07:00
Nathan Sobo
da56c1def5 💄 comments 2014-01-20 14:09:25 -07:00
Nathan Sobo
d965e9f56c Ensure change doesn't precede rendered range when updating foldability 2014-01-20 11:39:30 -07:00
Nathan Sobo
2831b43042 Update foldability indicators on changes that don't insert/remove lines
On changes that insert/remove lines, we redraw the entire gutter, which
ensures the foldability markers are up to date. But other kinds of
changes could change the foldability of lines… if a line becomes
commented or its indentation changes, the foldability of that line and
the lines above and below could be affected. For now, the gutter
understands this fact and updates the foldability for the region
extending from one line before to one line after each change. Someday
I'd like the view logic to not bake in knowledge of the folding rules,
but this works for now.
2014-01-20 11:17:58 -07:00
Nathan Sobo
4db2ad53fd Rename .fold class to .folded on line numbers in gutter
Using an adjective blends in better with '.foldable'
2014-01-18 11:35:22 -07:00
Nathan Sobo
99f025d5d6 Rename .fold-icon to .icon-right in gutter to make it multi-purpose 2014-01-17 16:59:50 -07:00
Nathan Sobo
fa6bce3085 Rename LanguageModel::isBufferRowFoldable to ::isFoldableAtBufferRow
It blends in better with the methods on Editor.
2014-01-17 15:19:07 -07:00
Nathan Sobo
1a12a17b7a Use actual markup for fold icon so we can determine when it's clicked 2014-01-17 14:55:06 -07:00
Nathan Sobo
8757e1f145 Add downward pointing chevrons next to foldable row numbers in gutter 2014-01-17 14:34:53 -07:00
Nathan Sobo
12ca214d6a 💄 Fix misleading variable name 2014-01-17 14:32:58 -07:00
probablycorey
95f2d02d18 Merge branch 'master' into cj-remove-editor-view-delegate-methods
Conflicts:
	package.json
	spec/workspace-view-spec.coffee
	src/editor.coffee
	src/gutter.coffee
2014-01-13 15:06:18 -08:00
Nathan Sobo
8b0b997db6 Kill EditorView::isAlive and just tunnel to the model where it was used 2014-01-10 18:28:01 -07:00
Nathan Sobo
578ca8b197 Don't update highlighted gutter lines unless the editor is alive 2014-01-10 17:56:04 -07:00
probablycorey
21b40acdf1 Remove delegate methods from EditorView 2014-01-10 15:31:33 -08:00
Nathan Sobo
914a87290b Remove unnecessary telepath requires 2014-01-03 16:36:26 -07:00
probablycorey
bf05ddb958 🔫
I screwed up a rebase, this nasty commit is the result.
2013-11-19 15:15:12 -08:00
probablycorey
756c2be64a Replace editor instance variables with editorView 2013-11-19 14:57:35 -08:00
probablycorey
aaa82e23da Rename Editor to TextEditorView 2013-11-19 14:34:20 -08:00
Ben Ogle
695c8d97f2 Remove all the complexity from the gutter check
Give up and serenader all whenever there is a change: newlines included.
2013-10-31 13:06:32 -07:00
Ben Ogle
d150170e5b Fix gutter rendering when there are folds
Fixes #1059
2013-10-31 12:54:21 -07:00
Kevin Sawicki
9d51d1a143 Use jquery provided by space-pen 2013-10-16 13:34:41 -07:00
Kevin Sawicki
216a5e61fd Update underscore-extensions requires 2013-10-15 13:50:16 -07:00
Ben Ogle
36c58e9132 💄 2013-10-08 16:03:25 -07:00
Ben Ogle
caae18c552 Partially render the gutter when possible. 2013-10-07 18:14:27 -07:00
Ben Ogle
9c6353977f Rework the api using native methods. This is 🐎
editor.300-line-file.gutter-api.getLineNumberElementsForClass.DOM: 3 / 20000 = 0.00015ms
editor.300-line-file.gutter-api.getLineNumberElement.DOM: 8 / 20000 = 0.0004ms
editor.300-line-file.gutter-api.toggle-class: 17 / 2000 = 0.0085ms
editor.300-line-file.gutter-api.find-then-unset.single-class: 3 / 200 = 0.015ms
editor.300-line-file.gutter-api.find-then-unset.multiple-class: 9 / 200 = 0.045ms
2013-10-07 14:57:45 -07:00
Ben Ogle
1ff97fc21a Add getLineNumbersForClass()
Also clean up and use klass
2013-10-07 13:57:00 -07:00
Ben Ogle
32329070c2 Add a simple gutter api for adding/removing classes 2013-10-07 13:31:31 -07:00
Ben Ogle
04cdad680b Remove ability to pass clearDirtyRanges and fillDirtyRanges extra vars
We don't need them anymore in the gutter.
2013-10-07 10:28:12 -07:00
Ben Ogle
5516dadffe Remove selective gutter rendering.
It is faster but incorrect in the case of newlines. It will have to be 
rethought. It can be a different unit of work
2013-10-07 10:28:11 -07:00
Ben Ogle
45d3fea3d0 Update only the changed line numbers 2013-10-07 10:28:09 -07:00
Kevin Sawicki
41fc4f7fe6 Use relative require paths in src/ files 2013-09-20 10:02:20 -07:00