Commit Graph

343 Commits

Author SHA1 Message Date
Kevin Sawicki
27b02a7981 Add initialColumn options to Workspace::open
This options works similarly to the existing initialLine option
2014-04-30 16:07:26 -07:00
Corey Johnson
fa4b3c8dea Merge pull request #1903 from atom/cj-add-deprecation-warning-to-specs
Remove all deprecated calls from core
2014-04-24 15:36:53 -07:00
Nathan Sobo
ad8bd98c9a Don't overwrite the file-scoped path variable 2014-04-24 10:13:01 -06:00
Corey Johnson
c03dec2783 Merge remote-tracking branch 'origin/master' into cj-add-deprecation-warning-to-specs 2014-04-23 16:51:14 -07:00
Corey Johnson
42e91defb9 Rename getEofPosition to getEndPosition 2014-04-23 16:06:32 -07:00
Nathan Sobo
7fe0f5b445 Make parameter names explicit in delegators 2014-04-23 09:56:49 -06:00
Corey Johnson
a15bb260c0 Update call to TextBuffer::rangeForRow 2014-04-22 17:52:07 -07:00
Corey Johnson
6b833043db Removed references to the isReversed option 2014-04-22 17:51:44 -07:00
Nathan Sobo
752aa9a8e9 Handle editor:page-up/down commands 2014-04-22 17:10:23 -06:00
Nathan Sobo
e4639281f8 Handle 'editor:scroll-to-cursor' command
Add Editor::scrollToCursorPosition in the model layer
2014-04-22 17:10:23 -06:00
Nathan Sobo
f53d489abb Add DisplayBuffer::scrollToScreen/BufferPosition
Also add delegators in Editor and ReactEditorView
2014-04-22 17:10:23 -06:00
Nathan Sobo
f59a8f1e68 Return function arg's result from Editor::batchUpdates 2014-04-22 17:09:45 -06:00
Nathan Sobo
a0ff6f5325 Handle 'autoscroll' option in model when setting selected buffer range 2014-04-22 17:09:45 -06:00
Nathan Sobo
19a5269a5f Remove metaprogrammed method delegators 2014-04-22 17:09:45 -06:00
Nathan Sobo
3a42346e5e Pause cursor blink as part of the overall editor update
This ensures we don't perform two updates of the cursors component when
cursors move as part of a larger change, such as typing text.
2014-04-22 17:09:44 -06:00
Nathan Sobo
033db8997b Batch updates when moving cursors
This ensures that updates associated with autoscroll and cursor movement
get combined.
2014-04-22 17:09:43 -06:00
Nathan Sobo
ddc677fb30 Batch multiple view updates with Editor::batchUpdates 2014-04-22 17:09:43 -06:00
Nathan Sobo
48d90e3dfc Funnel cursor and selection updates through EditorComponent 2014-04-22 17:09:43 -06:00
Nathan Sobo
2517765821 Rename 'core.useNewEditor' to 'core.useReactEditor' and default to false 2014-04-22 17:09:41 -06:00
Nathan Sobo
4b9871fa13 Enable advanced scroll management only when editor is used by react view
This preserves the original behavior of the editor model with respect
to scroll position and autoscroll unless it's being used by the react
component, which flips the ::manageScrollPosition flag to true.
2014-04-22 17:09:41 -06:00
Nathan Sobo
9a3f8022ad Add shims to get bracket matcher working 2014-04-22 17:09:40 -06:00
David Graham & Nathan Sobo
6997adece9 Associate TokenizedLines with an ::indentLevel
This can be used to render the appropriate number of indent guide spans
for empty lines.
2014-04-22 17:09:39 -06:00
Nathan Sobo
81233a696b Set default horizontalScrollMargin 2014-04-22 17:09:38 -06:00
Nathan Sobo
171631d20f Autoscroll cursors horizontally at the model layer
Still need to respect the horizontal scroll position in the editor view
2014-04-22 17:09:38 -06:00
Nathan Sobo
5c9a5cdc85 Emit 'cursors-moved' from editor when one or more cursors move 2014-04-22 17:09:37 -06:00
Nathan Sobo
af9355e4e6 Add Editor::getSelectedScreenRanges 2014-04-22 17:09:37 -06:00
Nathan Sobo
3a433f734c Move the cursor on single click 2014-04-22 17:09:36 -06:00
Nathan Sobo
bad2cebd6e Add Editor::setSelectedScreenRange 2014-04-22 17:09:04 -06:00
Nathan Sobo
e472d7b038 Add autoscrolling with react editor view
Its implemented in the model to restrict touching of the DOM.
2014-04-22 17:09:04 -06:00
Nathan Sobo
08bd03b706 Opt in to editor view only when core.useNewEditor is true 2014-04-22 17:09:04 -06:00
Nathan Sobo
5a8ca1ae66 Move screen-related properties to DisplayBuffer
Scroll positions, height, width, line height. We force update when one
of these observed properties changes.
2014-04-22 17:09:03 -06:00
Nathan Sobo
53cc5c9856 Base cursor x position on char widths stored in DisplayBuffer
Whenever new lines are added to the screen, we measure and store any
unseen scope/character combinations in the DisplayBuffer.
2014-04-22 17:09:03 -06:00
Nathan Sobo
48e2302ccb Handle almost all editor commands in EditorComponent 2014-04-22 17:09:03 -06:00
Nathan Sobo
c4fdb54650 Update editor component when a visible selection is removed 2014-04-22 17:09:03 -06:00
Nathan Sobo
cc8ba2d679 Update the rendered lines when the screen lines change 2014-04-22 17:09:01 -06:00
Corey Johnson
1583271e2f Use setTextInRange instead of change 2014-04-18 15:50:30 -07:00
Kevin Sawicki
0c01de350d 📝 Shorten and tweak comment 2014-04-17 18:23:40 -07:00
Kevin Sawicki
77641f138b Make Editor::mutateSelectedText public 2014-04-17 18:23:01 -07:00
Kevin Sawicki
a967e52f68 Autoscroll when moving lines up/down
Closes #1829
2014-04-16 12:43:51 -07:00
Corey Johnson
ecfb505144 Merge pull request #1851 from atom/cj-move-functionality-to-workspace-part-II
Move functionality from Project to Workspace Part II
2014-04-15 11:45:46 -07:00
Corey Johnson
54b60a5253 Don't assume atom.workspace is always defined 2014-04-14 08:49:03 -07:00
Corey Johnson
e56fa3ec4f Use PaneContainer to keep the state of open editors 2014-04-11 11:10:00 -07:00
Kevin Sawicki
1afdd62a5d Only alter indentation when it is too low
Previously insert newline above would use the current line's
indent level which could be the less than the proper level if the
newline should be further indented based on the increase indent
pattern being used.
2014-04-11 10:07:50 -07:00
probablycorey
63a80a4d4d Revert "Revert "Merge pull request #1844 from atom/cj-move-functionality-to-workspace""
This reverts commit 87d008c337.
2014-04-08 10:52:19 -07:00
probablycorey
87d008c337 Revert "Merge pull request #1844 from atom/cj-move-functionality-to-workspace"
This reverts commit 2d7dda066c, reversing
changes made to 96e3c63291.
2014-04-08 10:44:08 -07:00
probablycorey
7685b27218 Move editor tracking to workspace 2014-04-04 15:31:20 -07:00
probablycorey
59108322e7 Merge remote-tracking branch 'origin/master' into cj-warn-deprecations
Conflicts:
	package.json
2014-04-04 14:43:54 -07:00
Kevin Sawicki
6e422d5428 Move cursor to end of line when on first row
This line may be indented now so move the cursor to the
end of the indentation.
2014-04-04 10:47:25 -07:00
Kevin Sawicki
e464c4f047 Use current indent level for newline above
Previously Editor::insertNewlineAbove would put the cursor
at position 0 if there were empty lines above the current line
regarding of the indent level of the cursor's current line.

Now the indent level of the current line is always used for the newline
above when the editor.autoIndent config is enabled.
2014-04-04 10:47:25 -07:00
probablycorey
56222a072a Add deprecation warnings 2014-04-01 16:59:16 -07:00