Commit Graph

131 Commits

Author SHA1 Message Date
Nathan Sobo
706ef8e8ce Don’t use atom.config global in Cursor 2015-10-07 15:24:59 -05:00
Thomas Johansen
3ba594a542 🔥 Nuke Cursor deprecations 2015-09-22 10:37:05 -06:00
Nathan Sobo
698e414bfb Update selection and cursor state atomically before emitting any events
This ensures we correctly restore the last cursor when handling a cursor
destruction event. It fixes an exception that occurred when undoing
after splitting an editor.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-09-02 12:20:30 -06:00
Nathan Sobo
1fdc8fa49e 🐎 Prevent end-of-word search from scanning whole buffer
This was causing long pauses when selecting by word with the mouse in
certain locations.
2015-07-29 14:16:29 -06:00
Darrell Sandstrom
ecf68903af Add non-English characters to subword regex
Fixes #7656
2015-07-12 17:20:46 -07:00
Darrell Sandstrom
c02df26fa7 Add underscore to subword regex
Fixes #7658
2015-07-12 17:03:53 -07:00
Nathan Sobo
ba3ab41f1f Eliminate hack to move cursor to beginning of buffer
Use the structure of the regex plus a fix to text-buffer instead.
2015-06-30 22:52:35 -05:00
Nathan Sobo
83bddaf34e Merge branch 'master' into add-subword-cursors-4
Conflicts:
	spec/text-editor-spec.coffee
2015-06-30 15:43:33 -05:00
Machiste Quintana
d5bcc0433d WIP: 👕 Fix linter errors 2015-05-22 16:29:12 -04:00
Machiste Quintana
5d2392ea67 👕 Fix new coffeelint errors 2015-04-06 23:59:54 -04:00
Kevin Sawicki
7d592c8b78 includeDeprecations -> includeDeprecatedAPIs 2015-04-03 11:29:16 -07:00
Kevin Sawicki
82c39a5af9 Use lighter Model in cursor, selection, and project 2015-04-03 11:29:15 -07:00
Kevin Sawicki
bc58574238 Conditionally include deprecations in Cursor 2015-04-03 11:29:11 -07:00
Max Brunsfeld
decab183b7 Fix screen/buffer range error in paragraph cursor motions 2015-04-03 10:34:21 -07:00
Mert Kahyaoğlu
33faef2499 remove duplicate switch case 2015-04-01 20:34:59 +03:00
Nikolaus Wittenstein
5a3f2035a1 Replace skipAtomicTokens with clip
When clipping a screen position, callers used to have to pick between
clipping to the left edge or the right edge when the position was in the
middle of an atomic token. This change allows them to choose the closest
edge, and makes this the default.

This makes selecting hard tabs (or any other atomic tokens) work in a
similar manner as in other text editors; that is, when clicking near
the middle of a tab, the insertion point will move to the closest edge
rather than the left edge.
2015-03-29 19:43:25 -04:00
Max Brunsfeld
230eb12a8a Fix double autoscroll when moving cursor 2015-03-27 10:27:24 -07:00
Nathan Sobo
ae4f7f6170 Explicitly autoscroll when needed
Rather than when the selection’s marker changes. This is simpler than
suppressing autoscroll via state when we don’t want it. It also captures
the intent to autoscroll when attempting to move the cursor at the
beginning or end of the document.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-03-26 16:48:24 -06:00
Nathan Sobo
99c437ccec Allow autoscroll override option in cursor/selection methods
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-03-26 16:48:21 -06:00
Nathan Sobo
10458a5b45 Always autoscroll when the range of the last selection changes
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-03-26 15:30:53 -06:00
Max Brunsfeld
2f5d975338 Remove autoscroll-related legacy editor view support
Signed-off-by: Nathan Sobo <nathan@github.com>
2015-03-26 11:12:37 -07:00
Darrell Sandstrom
a8c4943d91 Add subword navigation
- Add commands for moving, selecting, and deleting camelCase words
2015-03-01 17:17:17 -08:00
Antonio Scandurra
ab5c79d009 Revert softWrapAtNewline attempt
...now we use `skipSoftWrapIndentation: true` when moving up and down.
2015-02-20 10:02:34 +01:00
Antonio Scandurra
59cc10a1ee Bring in @nathansobo PR changes
...as they were needed to pass specs
2015-02-19 21:09:06 +01:00
Antonio Scandurra
79c16a0d00 Use softWrapAtNewLines in moveDown and moveUp
/cc: @nathansobo
2015-02-19 20:01:37 +01:00
Antonio Scandurra
85e202ee0a Get rid of wrapAtPhantomTokens 2015-02-19 16:23:51 +01:00
Antonio Scandurra
e5eaa25381 Wrap at phantom tokens only when moving cursor left
This prevents a weird behavior that affects selection. Before this commit, when
moving the cursor down, if it was inside a real (soft|hard)-tab of a soft
wrapped line, it would reach the end of the line rather than the beginning of
the next wrapped line.

/cc: @nathansobo
2015-02-18 18:58:43 +01:00
Max Brunsfeld
dde5e6123c Make Cursor::updateVisibility private 2015-01-09 15:41:08 -08:00
Max Brunsfeld
aa8b97a039 Respect options to Cursor::getBeginningOfNextWordBufferPosition 2015-01-01 23:02:24 -08:00
Max Brunsfeld
a1b4820c04 Revert "Revert "Merge pull request #4631""
This reverts commit dc2a453986.

Conflicts:
	spec/config-spec.coffee
	src/config.coffee
2014-12-23 09:26:40 -08:00
Max Brunsfeld
dc2a453986 Revert "Merge pull request #4631 from atom/mb-new-config-api"
This reverts commit 5147fb6a8b, reversing
changes made to 9bbbb58084.
2014-12-16 15:27:39 -08:00
Nathan Sobo
c58606907a Make scope a trailing option to Config::get 2014-12-16 14:00:56 -08:00
Max Brunsfeld
a6f31ed791 Pass event to Cursor::onDidChangePosition callbacks 2014-12-09 17:21:03 -08:00
Max Brunsfeld
e04b5a74d7 Fix position in Cursor::moveToBeginningOfPreviousParagraph
Also, remove unused parameters to private Cursor methods
2014-12-09 16:59:50 -08:00
Ben Ogle
b635fa0c97 Use Grim.
Refs #3706
2014-12-01 10:58:23 -08:00
Ben Ogle
67d5d997c9 💄 in 📝 2014-11-11 13:08:27 -08:00
Ben Ogle
40c11410f0 Add Cursor::getMarker() method 2014-11-11 13:08:19 -08:00
Ben Ogle
58892be6f7 Use proper verbiage for the docs 2014-11-11 11:24:46 -08:00
Ben Ogle
2aaa025d72 Add deprecated getMoveNextWordBoundaryBufferPosition
Closes #4151
2014-11-11 11:24:10 -08:00
Ben Ogle
5c5c6e77fd Move method to be with similar methods in the docs. 2014-11-10 14:18:35 -08:00
Ben Ogle
e9678a15f1 Add more docs for getPrev/NextWordBoundary methods 2014-11-10 14:18:15 -08:00
Ben Ogle
f0135adb62 Fix method name 2014-11-10 14:17:48 -08:00
Ben Ogle
137eeab4cf Return scopes arrays from deprecated methods
backward compatibility
2014-10-21 11:19:58 -07:00
Ben Ogle
ce2959c0b9 Return ScopeDescriptor objects 2014-10-20 17:49:02 -07:00
Ben Ogle
274bbeec27 Fix deprecate reference 2014-10-13 16:32:17 -07:00
Ben Ogle
6ab002d4be Cursor::getScopes -> Cursor::getScopeDescriptor 2014-10-13 16:14:31 -07:00
Ben Ogle
416898e278 Scope usage of editor.nonWordCharacters 2014-10-08 16:01:40 -07:00
Ben Ogle
683d0d1b16 Editor -> TextEditor 2014-09-25 15:14:29 -07:00
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