Nathan Sobo
7e45ffa4c3
Center around the cursor in Editor::scrollToCursorPosition by default
...
Fixes #3131
2014-08-04 11:58:07 -06:00
Nathan Sobo
0edfbaebeb
Rename editor option to useHardwareAcceleration
2014-07-01 12:17:43 -06:00
Nathan Sobo
512d4da587
Add editor.gpuDisabled option to prevent React editor from using layers
...
When gpuDisabled is true, we use `translate` instead of `translate3d`
to position various elements, preventing the creation of GPU layers.
2014-07-01 11:56:05 -06:00
Justin Bradford
01a4032895
Add text selection using page up/down keys to the React-based editor
2014-06-20 13:09:16 -07:00
Justin Bradford
2b2b65ec82
Add command to select text using page up/down keys
2014-06-20 13:08:48 -07:00
Nathan Sobo
53c363b853
Merge pull request #2615 from adnelson/feature/delete-to-end-of-line
...
added delete to end of line
2014-06-18 10:46:48 -06:00
Ivan Zuzak
6c9df6d91a
Handle mousedown events only for left button in editors
2014-06-16 19:57:58 +02:00
Allen Nelson
fc462fcd21
added delete to end of line
2014-06-16 10:59:55 -05:00
Nathan Sobo
e26ab5513f
Don't assign scrollLeft on model on 'scroll-left-changed' events
...
Fixes #2513
I'm not entirely sure why, but for some reason we're getting into an
feedback cycle when the scrollLeft position changes in certain cases. In
theory, this shouldn't happen because reassigning the same value
shouldn't emit a change event. But since we're about to end-of-life the
jQuery editor, I'd like to try fixing it this way for now.
2014-06-12 17:01:12 -06:00
Ben Ogle
87915f70e2
editor.scrollSensitivity option
2014-06-11 12:07:49 -07:00
Nathan Sobo
131aad24c0
Merge branch 'master' into cj-add-react-editor-shims
2014-06-11 06:48:16 -06:00
Corey Johnson
31d7110bba
Remove getPageRows from API
2014-06-09 14:42:47 -07:00
karlin
8577bf9a4c
select to beginning of next or previous paragraph commands
2014-06-06 08:37:59 -04:00
Kevin Sawicki
07a2a6710d
Reload grammar in editor when path changes
2014-05-27 12:58:17 -07:00
Maximilian Schüßler
7e5d554bd8
Fix example in editor-view.coffee
2014-05-25 21:27:21 +02:00
Corey Johnson
7f418e2de4
Add move by paragraph commands
2014-05-23 09:13:44 -07:00
Kevin Sawicki
314833bbac
Add missing parens on indent guide check
...
Previously the indent guide was always showing on the whitespace only lines
Closes #2274
2014-05-19 08:52:06 -07:00
Kirill Nikitin
917b223c6c
merge conflict
2014-05-16 11:45:43 +04:00
Flannelhead
534704a32c
Check for e.ctrlKey instead of e.metaKey if not on Mac.
2014-05-15 10:09:50 +03: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
Teddy Bradford
1519dda294
Remove duplicate . from default nonWordCharacters
2014-05-11 02:10:30 -04:00
Cheng Zhao
f0bd3b1c20
Ignore the "paste" event, fixes #1945 .
...
Somehow on Linux the "paste" event is emitted when user presses ctrl-v,
even if the ctrl-v has been captured by window event handler. This
should be a bug of Chromium.
2014-05-07 10:39:01 +08: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
Nathan Sobo
aeb5a84696
Do render indent guides for tokens with leading whitespace
2014-04-23 17:04:20 -06:00
Nathan Sobo
228836447c
Only render trailing whitespace indent guides on whitespace-only lines
...
Fixes #1895
2014-04-23 16:58:10 -06:00
Corey Johnson
6b833043db
Removed references to the isReversed option
2014-04-22 17:51:44 -07:00
Nathan Sobo
205e10fd09
Fix undefined variable references rendering lines
2014-04-22 17:09:41 -06:00
David Graham & Nathan Sobo
6b10fcc2f8
Rely on token's knowledge of its own leading/trailing whitespace status
...
Previously, we were determining this at render time. But its baked into
the state of tokens when TokenizedLines are constructed now so we no
longer need to compute it when rendering.
2014-04-22 17:09:39 -06:00
Nathan Sobo
2f42f23ec6
Revert changes to editor-view
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
a134a60ce8
Render the entire editor with React. Handle vertical scrolling.
...
The space-pen view is now a simple wrapper around the entire React
component to integrate it cleanly into our existing system. React
components can't adopt existing DOM nodes, otherwise I would just have
the react component take over the entire view instead of wrapping.
2014-04-22 17:09:02 -06:00
Nathan Sobo
da36d5f40f
Start experimenting with an EditorView that renders content with React
2014-04-22 17:09:01 -06:00
Kevin Sawicki
3d10c3856b
Replace all periods with a single space
...
Refs atom/language-make#6
2014-04-22 09:33:17 -07:00
Kevin Sawicki
c475e89a3e
Remove duplicate tilde
...
Closes #1866
2014-04-16 12:07:43 -07:00
Nathan Sobo
34f624c895
Unsubscribe from the editor model with ::unsubscribe
2014-04-15 19:07:57 -06:00
Nathan Sobo
d554b7fd03
Remove scopes from event names in subscriptions
2014-04-15 18:50:36 -06:00
Nathan Sobo
a61dff6e21
🚱 Unsubscribe from Editor when EditorView is removed
...
This replaces calls to `@editor.on` with `@subscribe @editor`. That
causes us to correctly unsubscribe when the editor is removed, avoiding
a memory leak.
2014-04-15 18:46:20 -06:00
Kevin Sawicki
79399a3c5a
💄 Remove extra newline
2014-04-04 14:03:51 -07:00
Corey Johnson
50e045212b
Measure the rendered char width instead of the buffer char
...
If invisibles are turned on, the buffer char and the rendered char
may differ in size. For example, if `☃` is used as the tab invisible
its width is probably larger than the width of a `\t`
Closes #1724
2014-03-26 13:57:04 -07:00
Kevin Sawicki
0adae86b4d
Don't set line height on mini editors
2014-03-25 10:55:32 -07:00
Justin Palmer
cf590685b9
remove lineHeight getter
...
Nothing is using it and we can add it back once the need arises.
2014-03-24 12:52:01 -07:00
Justin Palmer
a604bfcdf1
remove trailing whitespace
2014-03-24 11:42:32 -07:00
Justin Palmer
ce02dcf5a5
clarify docs around lineHeight
2014-03-24 11:37:38 -07:00
Justin Palmer
d3d38c0312
rename editorLineHeight to lineHeight
2014-03-24 11:28:15 -07:00
Justin Palmer
95d097dd7b
1.3 best represents the previous default line height
2014-03-24 10:59:19 -07:00
Justin Palmer
47f3b562b5
add getter for editorLineHeight
2014-03-24 10:58:58 -07:00
Justin Palmer
5eb12e671b
add config option for explicitly setting the editor line height
2014-03-24 10:58:26 -07:00
Nathan Sobo
424652e27c
Also ensure editor is *visible* before recalculating dimensions
2014-03-21 17:33:39 -06:00
Nathan Sobo
50c25d9e44
Read scrollView width prior to touching the DOM to prevent reflow
2014-03-20 18:02:04 -06:00