Commit Graph

371 Commits

Author SHA1 Message Date
Nathan Sobo
03463da729 Allow Editor::batchUpdates calls to be nested 2014-06-03 17:43:56 +09:00
Corey Johnson
d2d63d3241 Merge pull request #2431 from atom/cj-add-tokenized-event
Use tokenized event to determine tab style
2014-05-29 15:19:14 -07:00
Corey Johnson
40a2ed3703 Merge pull request #2364 from themaninthesuitcase/cp-projectRelativeTabPath
Update getLongTitle to be project relative
2014-05-29 09:51:45 -07:00
probablycorey
7f57a094f6 Determine softTab state after the buffer is tokenized. 2014-05-28 16:31:00 -07:00
Chris Pearson
61cb22840e Update getLongTitle to fall back to basename
Update getLongTitle to fall back to basename when the relative path
resolves to a blank string.
2014-05-28 15:12:51 +01:00
Corey Johnson
3784b77b95 Merge remote-tracking branch 'origin/master' into cj-paragraph-test 2014-05-23 09:23:30 -07:00
karlin
64470a3c7d add moveToBeginningOf{Next,Previous}Paragraph for cursor and wrappers for editor 2014-05-23 00:51:01 -04:00
Chris Pearson
a337384e7b Update getLongTitle to be project relative 2014-05-22 21:49:49 +01:00
Kevin Sawicki & Nathan Sobo
9e3ce09658 Rename lineHeight to lineHeightInPixels to distinguish from CSS value
CSS has a line-height property with values like '1.3', but we also have
a measured pixel value for line height. It's important to keep these
separate conceptually.
2014-05-22 10:17:12 -06:00
Nathan Sobo
d2bc7ab192 Merge pull request #2258 from atom/ns-react-scroll-perf
Improve scroll performance of the React editor
2014-05-19 14:42:18 -06:00
Nathan Sobo
57e6419d1d Restore conditional loading of react editor renderer 2014-05-16 15:31:16 -06:00
Nathan Sobo
89bd241a78 Always run react in dev mode for now 2014-05-16 15:31:14 -06:00
Nathan Sobo
7a9278e6a7 Render selection fragments on opaque lines
Because lines are opaque on the GPU for sub pixel antialiasing, the
lines obscure the selections which were formerly rendered behind the
lines. This commit renders selection fragments *on* each opaque line
layer so the selections look correct again. Still needs cleanup and
optimization.
2014-05-16 15:31:13 -06:00
Nathan Sobo
7d8256d343 Drop lineOverdraw and scroll-view-content div 2014-05-16 15:31:11 -06:00
Nathan Sobo
bf9f8597a7 Give each line its own layer on the GPU 2014-05-16 15:31:11 -06:00
Kirill Nikitin
917b223c6c merge conflict 2014-05-16 11:45:43 +04:00
Corey Johnson
25f5717ccf Merge pull request #1971 from abe33/feature_proper_multiselections_copy_paste
Implements multiple selections clipboard paste
2014-05-12 11:10:37 -07:00
Kirill Nikitin
111b5d1fbe 💄 Deprecate backspaceToBeginningOf{Word,Line}
Rename functions `backspaceToBeginningOfWord` to `deleteToBeginningOfWord` and
`backspaceToBeginningOfLine to `deleteToBeginningOfLine`.
Rename commands `editor:backspace-to-beginning-of-word` to
`delete-to-beginning-of-word` and `editor:backspace-to-beginning-of-line` to
`editor:delete-to-beginning-of-line`.

Fix #1791
2014-05-12 02:50:20 +04:00
Nathan Sobo
dbd271f70a Don't obscure last character of long lines with vertical scrollbar
This entailed quite a few changes to dial in scrollbars. The scrollbars
are now adjusted in size to account for the width of the opposite
scrollbar. If the width or height are not explicitly constrained and we
are scrollable in the opposite direction that is constrained, we account
for the width of the opposite scrollbar in assigning a natural height
or width based on the content.
2014-05-09 11:33:04 -06:00
Nathan Sobo
7b4bc16531 Fix specs that broke when accounting for horizontal scrollbar height 2014-05-09 11:33:03 -06:00
Nathan Sobo
e6df30e94c Respect horizontal scrollbar when rendering the vertical, and vice versa
We set overflow to hidden in the opposite scroll direction only if we
can't actually scroll in that direction, causing the white square where
neither scrollbar overlaps to appear at the lower right corner.
2014-05-09 11:33:03 -06:00
abe33
75eb0182e9 💄 Use skinny arrow instead 2014-05-09 00:03:40 +02:00
Corey Johnson
a649d75ab8 Merge remote-tracking branch 'origin/master' into cj-tabs-be-weird
Conflicts:
	package.json
2014-05-08 14:36:50 -07:00
Lee Dohm
9b49c2f987 📝 Some simple documentation fixes 2014-05-07 22:38:51 -07:00
probablycorey
6bb260140b Don't use comment lines to determine soft/hard tabs.
Closes atom/language-php#24
Closes #1733
2014-05-07 12:18:05 -07:00
Pascal Borreli
7070ed8ae4 Fixed typos 2014-05-07 08:52:58 +01:00
abe33
4b7d982eb4 💄 Fix typo in pasteText method comments 2014-05-06 23:26:13 +02:00
abe33
fbabc6f455 Implements multiple selections clipboard paste
Includes:

  - Passing the selection index in the `Editor::mutateSelectedText`
method callback
  - Storing all the selections content on many calls of
`Selection::copy` with `maintainClipboard = true` in a metadata
`selections` array
  - Handling clipboard with a `selections` metadata in
the`Editor::pasteText` method
2014-05-06 23:19:39 +02:00
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