Ben Ogle
9c53d6f014
Deprecate getCursor()
2014-08-28 18:10:18 -07:00
Ben Ogle
2551313b58
Deprecate methods on cursor
2014-08-28 16:31:10 -07:00
Ben Ogle
7ca5ece68a
Add methods to be symmetrical with selections
...
* getCursorsOrderedByBufferPosition
* getCursorBufferPositions
* getCursorScreenPositions
2014-08-28 16:06:44 -07:00
Ben Ogle
8aae7b983e
📝 Convert Cursor Docs
2014-08-25 15:13:45 -07:00
Nathan Sobo
5cb084d568
Fix editor:move-to-first-character-of-line with leading hard tabs
...
Fixes #3314
2014-08-19 11:50:04 -06:00
Maximilian Schüßler
32e59ce238
Cleanup code according to coffeelint
2014-08-14 19:41:49 +02:00
Nathan Sobo
7b55946abf
Make Editor::moveCursorToFirstCharacterOfLine work with invisible chars
2014-08-13 16:31:40 -06:00
Nathan Sobo
7e45ffa4c3
Center around the cursor in Editor::scrollToCursorPosition by default
...
Fixes #3131
2014-08-04 11:58:07 -06:00
Nathan Sobo
d042d15a50
Autoscroll to cursor on undo
...
Fixes #2815
This commit changes our autoscroll strategy for cursors significantly.
Originally, we were autoscrolling whenever the cursor's marker changed
positions. This worked well, except we didn't end up autoscrolling when
the user *attempted* to move the cursor to an invalid position, such as
moving down at the end of the buffer, due to the fact that the marker
wouldn't change.
Then, we moved to always requesting an autoscroll whenever a position
change was requested via Cursor::changePosition. This missed out on
moving the cursor when inserting text, so we then also added an explicit
autoscroll call when inserting text.
This had the problem of not autoscrolling due to undo. So finally, this
solution combines explicit autoscroll in ::changePosition to capture
intent, as well as implicit autoscrolling whenever the cursor's marker
position changes due to a textual change in the buffer. This captures
undo/redo correctly.
2014-07-07 15:21:48 -06:00
Nathan Sobo
b689ffd402
Autoscroll cursor when attempting to move it, even if it doesn't move
2014-06-28 15:26:02 +01:00
Kevin Sawicki
d0513cb95d
📝 Doc optional param and default property value
2014-06-17 08:49:57 -07:00
karlin
64470a3c7d
add moveToBeginningOf{Next,Previous}Paragraph for cursor and wrappers for editor
2014-05-23 00:51:01 -04:00
Pascal Borreli
7070ed8ae4
Fixed typos
2014-05-07 08:52:58 +01:00
Kevin Sawicki
a4ee412e96
Remove Math.max corrections to range
...
Editor::getTextInBufferRange will clip the specified range instead.
2014-04-30 09:58:37 -07:00
Kevin Sawicki
4f655d7de5
📝 Update comment to match behavior
2014-04-30 09:58:37 -07:00
Kevin Sawicki
aa4749f175
Select all adjacent whitespace on double click
...
Cursor::isSurroundedByWhitespace was use column 0 instead of the
position right before the cursor.
2014-04-30 09:58:37 -07: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
a0ff6f5325
Handle 'autoscroll' option in model when setting selected buffer range
2014-04-22 17:09:45 -06:00
Nathan Sobo
93388c2048
Make Cursor and Selection models for automatic id assignment
2014-04-22 17:09:43 -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
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
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
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
Kevin Sawicki
3e24d045e5
Allow backspace to beginning of word on first line
...
Previously this would fail when only whitespace was to the
left of the cursor.
2014-04-03 12:04:22 -07:00
Nathan Sobo
53fb36d0e2
Switch all documentation links to match CoffeeScript literal notation
...
Foo::bar for instance methods
Foo.bar for class methods
2014-02-19 17:23:47 -07:00
Kevin Sawicki
fd7c2e92c5
📝 doc parameters in cursor.coffee
2014-02-06 16:03:00 -08:00
Kevin Sawicki
cee0b951fb
Remove empty Private: comments
2014-02-06 10:11:32 -08:00
Kevin Sawicki
932a792289
Remove Private: prefix
2014-02-06 10:02:53 -08:00
Nathan Sobo
25cc37bc86
Replace {StringMarker} references with {Marker} in API docs
2014-01-06 15:13:12 -07:00
Nathan Sobo
c6770aa83e
Merge remote-tracking branch 'origin/master' into ns-remove-telepath-from-core
...
Conflicts:
package.json
src/pane.coffee
2014-01-03 17:46:45 -07:00
Nathan Sobo
bc65137911
Remove telepath from Project, WorkspaceView, and Pane*
2014-01-03 16:23:23 -07:00
probablycorey
c37b884007
Add moveCursorToEnd/BeginningOfBufferLine
...
Fixes #1123
2013-12-31 08:21:35 -08:00
probablycorey
bac76784e0
cmd-left moves the cursor to column 0 on lines only containing whitespace
...
Fixes #1344
2013-12-30 13:57:34 -08:00
Kevin Sawicki
29b85a1bb9
Clear the goal column when the cursor moves
...
Previously it was only cleared when changing the position explicitly
and not as a result of the underlying marker changing such as during a
text insertion.
Closes #1295
2013-12-11 18:02:52 -08:00
probablycorey
31a9bb83cf
Replace editSession variables with editor
2013-11-19 15:22:47 -08:00
probablycorey
bf05ddb958
🔫
...
I screwed up a rebase, this nasty commit is the result.
2013-11-19 15:15:12 -08:00
probablycorey
955d379e0e
Rename EditSession to TextEditor
2013-11-19 14:56:09 -08:00
Matt Colyer
b323d9ce18
Rename hasNoPrecedingCharacters => hasPrecedingCharactersOnLine
2013-11-15 15:32:24 -08:00
Matt Colyer
64f2cdb795
💄
2013-11-13 17:35:21 -08:00
Matt Colyer
52680bd63f
Don't normalize indents on paste if there are preceding characters
2013-11-13 17:18:43 -08:00
Kevin Sawicki
a377a49004
Use atom.config instead of window.config
2013-11-11 09:16:44 -08:00
Kevin Sawicki
216a5e61fd
Update underscore-extensions requires
2013-10-15 13:50:16 -07:00
Kevin Sawicki
e5ac73e0db
Use includeInto instead of _.extend
2013-10-14 17:28:26 -07:00
Kevin Sawicki
0b0c3229d3
EventEmitter is exported as Emitter
2013-10-14 17:28:26 -07:00
Kevin Sawicki
a0486bc9b0
Use emit instead of trigger
2013-10-14 17:28:26 -07:00
Kevin Sawicki
f9a0e038a5
Use emissary for EventEmitter and Subscriber
2013-10-14 17:28:26 -07:00
Kevin Sawicki
e2daef477c
Return false if either character is whitespace
2013-09-27 16:00:24 -07:00
Kevin Sawicki
cd4e64a8f8
📝 correct typos in comments
2013-09-27 16:00:24 -07:00
Kevin Sawicki
542d17913d
📝 doc Cursor.isBetweenWordAndNonWord()
2013-09-27 16:00:24 -07:00