Ben Ogle
021208d933
Update Cursor::onDidChangePosition doc string
2014-09-22 16:12:51 -07:00
Ben Ogle
e5c03e139a
Only pass event to the editor
2014-09-22 15:50:40 -07:00
Ben Ogle
5083c18c84
Add cursor to onDidChangeCursorPosition event object
2014-09-22 15:37:41 -07:00
Ben Ogle
2af699f35e
Rename cursor sections
2014-09-18 17:27:08 -07:00
Ben Ogle
fad83fff1c
Change name of section in cursor
2014-09-17 15:57:24 -07:00
Ben Ogle
6467f3c425
Reorganize cursor into sections
2014-09-16 16:50:17 -07:00
Ben Ogle
f8b17b6b3c
Add Returns line to all the event subscription methods
2014-09-10 17:07:21 -07:00
Ben Ogle
2e219f288d
Add sections for docs clarity
2014-09-09 15:55:47 -07:00
Ben Ogle
e452b88fec
Add sections for events
2014-09-09 12:30:43 -07:00
Ben Ogle
9db804b413
Doc events in Cursor
2014-09-09 10:51:46 -07:00
Nathan Sobo
56687027b6
Add Cursor::onDidChangePosition and ::onDidDestroy and deprecate ::on
2014-09-05 11:39:34 -07:00
Nathan Sobo
1131b33a83
Add DisplayBufferMarker::onDidChange and ::onDidDestroy
2014-09-05 11:39:33 -07:00
Nathan Sobo
2a81687d38
Add Editor::onDidMoveCursor
2014-09-05 11:39:33 -07:00
Ben Ogle
691c7ee585
Considerably more elegant (and correct) moveLeft and moveRight
2014-09-03 17:19:06 -07:00
Ben Ogle
7a3893c7bb
Update doc strings
2014-09-03 16:10:33 -07:00
Ben Ogle
06165b2167
Remove the max call
2014-09-03 16:10:33 -07:00
Ben Ogle
f82c59d865
Add columnCount to moveRight
2014-09-03 16:10:33 -07:00
Ben Ogle
29f15d0f20
Make moveLeft() with huge values span multiple rows
2014-09-03 16:10:33 -07:00
Ben Ogle
99c07decf2
Add columnCount var to Editor::moveLeft and Cursor::moveLeft
2014-09-03 16:10:33 -07:00
Ben Ogle
851034c8d3
Failing test
2014-09-03 16:10:33 -07:00
Ben Ogle
3a85148f69
Fix doc strings
2014-09-03 16:10:33 -07:00
Ben Ogle
c0c941b8db
lineForBufferRow -> lineTextForBufferRow
2014-09-03 14:42:46 -07:00
Ben Ogle
1f925078e9
Remove deprecation
2014-09-02 14:59:06 -07:00
Ben Ogle
a564da1eb0
Remove unnecessary deprecated methods
2014-09-02 14:58:20 -07:00
Ben Ogle
5163d0f810
Fix dupe functions
2014-08-28 18:19:12 -07:00
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