Ben Ogle
b028673b5d
Only render on updates
2014-06-16 15:36:08 -07:00
Ben Ogle
6394814142
Make foldable decorations work again
2014-06-16 15:36:08 -07:00
Ben Ogle
2d4360dcf0
Decorations can now only be attached to markers.
...
The basics work. It will render them on the gutter.
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
7142022f05
Add intersection support to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
25520a4cad
Add containedInScreenRange to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
56da6399b8
Add startScreenRow and endScreenRow to DisplayBuffer::findMarkers
2014-06-16 15:36:08 -07:00
Ben Ogle & Nathan Sobo
a7379b067a
Use ::getMarker for fold decorations instead of new DisplayBufferMarker
2014-06-16 15:36:07 -07:00
Ivan Zuzak
6c9df6d91a
Handle mousedown events only for left button in editors
2014-06-16 19:57:58 +02: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
Corey Johnson
4186a4943b
Remove react shims deprecations
2014-06-12 14:53:09 -07:00
Corey Johnson
e179860519
Merge pull request #2571 from lee-dohm/bug-2526
...
Change line commenting to uncomment if all non-blank lines are commented out
2014-06-12 08:45:47 -07:00
Ivan Žužak
43f8596fb1
Merge pull request #2584 from atom/iz-fix-tab-unindent
...
Outdent only if a tab is matched at the start of the line
2014-06-12 17:39:23 +02:00
Ben Ogle
2c7d01e398
Merge pull request #2588 from atom/bo-fix-page-up-down
...
Fix pageUp and pageDown in the react editor
2014-06-11 17:30:59 -07:00
Ben Ogle
1bdf45f7d6
Fix gutter width
...
When you had a 1000 line file and you fold everything
into 10 lines, it would make the gutter width only large
enough for the 10 lines, so line 999 wouldnt properly
fit in the gutter.
Refs #2423
2014-06-11 17:28:12 -07:00
Ben Ogle
7e6e61905b
Move the cursor on pageUp / pageDown
...
Previously it was only moving the scrollTop, but not the cursors.
Affected on the react editor.
Refs #2423
2014-06-11 17:19:59 -07:00
Ben Ogle
87915f70e2
editor.scrollSensitivity option
2014-06-11 12:07:49 -07:00
Ben Ogle
ec07cb9524
Slow the scroll speed
2014-06-11 12:07:48 -07:00
Nathan Sobo
1b4426e3ba
Don't pause overflowchanged events after React editor updates
...
Fixes #2237
Previously, operations such as typing and scrolling were triggering
overflowchanged events on the editor, which concerned me because we
were performing lots of unnecessary measurements of the scroll view.
Now that we draw extra lines above and below the visible screen row
range, this doesn't happen, so we can remove this pausing code which
was delaying the resizing of the editor in certain situations.
2014-06-11 12:07:05 -06:00
Nathan Sobo
030bcd6d4f
Make react cursor the width of a default character at the end of lines
...
When the cursor is positioned before a character, we always make it the
width of that character. But at the end of a line, there is no character
to use to set the width, so we just use the defaultCharWidth.
This makes the block cursor visible on empty lines in vim-mode.
2014-06-11 11:54:10 -06:00
Nathan Sobo
7c1a4a9e08
Don't clip range start/end in DisplayBuffer::pixelRectForScreenRange
...
Fixes #2583
This prevents the cursor from having 0 width inside atomic tokens.
2014-06-11 11:40:57 -06:00
Corey Johnson
f4b7f86eb0
Revert "Remove editor-colors class from lines component"
...
This reverts commit 8cca198af1 .
2014-06-11 10:02:16 -07:00
Corey Johnson
8cca198af1
Remove editor-colors class from lines component
2014-06-11 09:53:56 -07:00
Ivan Zuzak
588d9b97eb
Unindent only if the tab is at the start of the line
2014-06-11 18:31:37 +02:00
Corey Johnson
4f77a371f4
Merge pull request #2497 from atom/cj-add-react-editor-shims
...
Add shims to the React View Editor
2014-06-11 09:06:40 -07:00
Corey Johnson
94dd1eed54
Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
...
Conflicts:
src/editor-component.coffee
2014-06-11 08:56:27 -07:00
Ben Ogle
09b91974a7
Fix casing on Grim import
2014-06-11 08:52:36 -07:00
Nathan Sobo
99611fad34
Give React editor lines and line numbers an opaque background
...
This ensures subpixel antialiasing works correctly. It was previously
present on both of these components but got dropped accidentally.
2014-06-11 08:51:19 -06:00
Nathan Sobo
1b026cc805
Set is-focused class on React editor's wrapper view for now
2014-06-11 08:37:16 -06:00
Nathan Sobo
b73d267a5f
Merge branch 'master' into cj-add-react-editor-shims
2014-06-11 07:34:41 -06:00
Nathan Sobo
5add0e4f70
Don't forceUpdate in setImmediate callback if editor is unmounted
...
This was throwing errors in the EditorComponent spec.
/cc @benogle, just so you're aware
2014-06-11 07:21:05 -06:00
Nathan Sobo
7040906473
Ignore null bytes when measuring character widths in React editor
...
Fixes #2391
2014-06-11 07:18:52 -06:00
Nathan Sobo
131aad24c0
Merge branch 'master' into cj-add-react-editor-shims
2014-06-11 06:48:16 -06:00
Nathan Sobo
64870c733b
Add API for enabling/disabling input to support vim-mode's insert mode
2014-06-11 06:07:41 -06:00
Nathan Sobo
68ca6a0a0d
Merge pull request #2532 from karlin/select-paragraphs
...
Adds select-to-beginning-of-next/previous-paragraph commands
2014-06-11 05:39:30 -06:00
probablycorey
9e7e77bdf8
Merge remote-tracking branch 'origin/master' into cj-add-react-editor-shims
...
Conflicts:
src/gutter-component.coffee
2014-06-10 15:42:23 -07:00
probablycorey
d0385a90ea
Revert "Use ReactEditorView in the workspace view spec"
...
This reverts commit b46ac9080c .
2014-06-10 15:37:49 -07:00
probablycorey
f9c4af301d
Shim scrollView outlet
2014-06-10 15:19:54 -07:00
Lee Dohm
3cf4b7b3e4
Use imperative style and standard JS regex
...
Based on pull request feedback
2014-06-10 14:54:01 -07:00
Nathan Sobo
562a047b9e
Only requestUpdate when scrolling stops if component is still mounted
...
Fixes #2566
2014-06-10 12:13:57 -06:00
Lee Dohm
a2c9c21cfb
Change line commenting to ignore blanks if any non-blanks
...
Fixes #2526
This slightly alters the heuristic for deciding whether to uncomment
or to comment blocks of code. Previously, it would key off the first
line of code and only if that was commented would it check the other
lines. Now it checks all lines of code and uncomments the block if all
non-blank lines are commented out.
2014-06-09 21:31:46 -07:00
probablycorey
b46ac9080c
Use ReactEditorView in the workspace view spec
2014-06-09 17:35:44 -07:00
Corey Johnson
a227ed7586
Add toggleSoftWrap and toggleSoftTabs
2014-06-09 16:10:29 -07:00
Corey Johnson
0396aac11f
Add several setter shims to ReactEditorView
2014-06-09 16:03:20 -07:00
Ben Ogle
5db163a328
💄
2014-06-09 16:01:29 -07:00
Ben Ogle
756347a716
Add has-selection class to the editor div when there is a selection
2014-06-09 15:45:32 -07:00
Corey Johnson
7379627fcb
Add several scroll shims to ReactEditorView
2014-06-09 15:37:02 -07:00
Corey Johnson
a2c4caf7ad
Move scroll methods below afterAttach method
2014-06-09 15:14:48 -07:00
Corey Johnson
e8b6fb919e
Add shim for ReactEditorView::redraw
2014-06-09 15:06:49 -07:00
Corey Johnson
601c877136
Add pageDown/pageUp to ReactEditorView
2014-06-09 14:46:47 -07:00
Ben Ogle
6c609cb7d2
Revert "Move setImmediate into requestUpdate; Batch updates"
...
This reverts commit ad522e6ab1 .
2014-06-09 14:45:43 -07:00