Commit Graph

140 Commits

Author SHA1 Message Date
Luke Pommersheim
2655513673 CR: copyOnlySelectedText only works on selected text, no matter of cursor position 2015-08-04 10:30:59 +02:00
Luke Pommersheim
146363bba6 💚 tests for copying only selected text unless cursor is at the beginning of the line 2015-08-04 10:30:59 +02:00
Nathan Sobo
12dc045329 Fix bug where word- and line-wise selections got stuck in reversed state 2015-07-29 11:49:14 -06:00
Antonio Scandurra
d46fea9d10 Emit did-insert-text on pasteText() 2015-07-28 10:38:11 +02:00
Nathan Sobo
2d25301ea0 Destroy folds when DisplayBuffer is destroyed
Fixes #4562
2015-07-27 12:04:46 -06:00
Sander van Harmelen
df1b193eba Add a test for the indent fix 2015-07-23 19:23:03 +02:00
Nathan Sobo
375211b278 Merge pull request #7859 from dsandstrom/update-subword-regex
Update subword regex
2015-07-17 14:11:41 -07:00
Max Brunsfeld
b24258056d Merge pull request #7858 from svanharmelen/b-fix-indenting
Fix indentation when pasting lines
2015-07-17 09:46:47 -07: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
Sander van Harmelen
e7de136a27 Small tweaks after review 2015-07-13 00:58:03 +02:00
Sander van Harmelen
195b84a34a Fix indentation when pasting lines
The fix to ignore invisibles () introduces a new bug when pasting lines
from the clipboard (see screencast below).

As the commit takes the content of `@buffer.lineFromRow(bufferRow)` to
test against the `decreaseIndentRegex`, it will actually test the
content of the row the cursor is on instead of the content that is
being pasted. And this (of course) could cause unexpected indentations.
2015-07-12 23:57:13 +02:00
Max Brunsfeld
c60c00f626 Ignore NaN coordinates passed to workspace.open 2015-07-08 16:50:17 -07:00
Sander van Harmelen
eaf814e5be Improve auto indenting by removing a hard coded restriction and adding a 3rd regexp
Currently there are only two regexps that can influence the indents.
Those are `increaseIndentPattern` (which tells Atom the indent of next
line should be increased) and `decreaseIndentPattern` (which tells Atom
the indent of the current line should be decreased).

But I found that a couple of languages would need a 3rd regexp in order
to support their use cases. This 3rd regexp should be a mixture of the
existing two so it tells Atom that the indent of the next line should
decrease.

I’ll add a screencast to show a use case for this 3rd regexp which I
would like to call `decreaseNextIndentPattern`.
2015-07-08 20:30:21 +02:00
Max Brunsfeld
8c3400c084 Emit will-insert-text event when pasting 2015-07-06 18:29:44 -07:00
Nathan Sobo
df6ef94b60 🎨 add spaces after commas 2015-06-30 23:03:55 -05:00
Nathan Sobo
e472830063 Merge remote-tracking branch 'origin/master' into dsandstrom-add-subword-cursors-4 2015-06-30 22:55:40 -05: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
eae9a45579 🎨 Clean up spec language 2015-06-30 15:54:15 -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
Nathan Sobo
82e25872b2 Handle indentation with mixed tabs and spaces 2015-06-30 15:31:11 -05:00
Nathan Sobo
b6d099ac78 Consider tabs or spaces mutually exclusively as indentation
Previously, we allowed a mix of tabs and spaces to be counted toward the
indentation of a line. This caused problems when auto-indenting lines in
a hard-tabbed file that contained “alignment spaces”, such as occurs in
aligned comment blocks. For this case, it makes more sense to assume
that the line is indented via tabs only, and consider the subsequent
alignment space as part of the line’s content. Since it’s hard to
imagine actual source code in which a mixed treatment of tabs and spaces
is desirable, I’m going with this over any more complex approach.
2015-06-29 17:05:28 -05:00
Max Brunsfeld
3cdeaa8b51 Don't auto-indent when pasting text w/ no line breaks 2015-06-17 10:57:21 -07:00
Luke Pommersheim
8521b81051 spec - getCursorAtScreenPosition checks cursors instead of cursor.marker 2015-06-12 19:21:37 +02:00
Luke Pommersheim
63e491affa spec now checks if the cursors are the same, not their markers 2015-06-12 08:37:40 +02:00
Luke Pommersheim
5822eb11f1 function that returns the first matched Cursor at a given screen position Point if it exists in that location 2015-06-11 13:02:14 +02:00
Nathan Sobo
3ac9d539ce Add a super basic test for large file mode 2015-06-05 23:40:38 +02:00
Kevin Sawicki
82eb01d13e Move deserialize spec to text-editor-spec 2015-06-01 18:01:34 -07:00
Machiste Quintana
8ca1cf2c98 👕 Fix linter errors in text-editor-spec 2015-05-22 19:50:04 -04:00
Machiste Quintana
82958d5aa0 WIP: 👕 Fix even more linter errors 2015-05-22 17:03:06 -04:00
Nathan Sobo
2379b3803f Revert "Revert "Merge pull request #6757 from atom/ns-less-memory-for-tokens""
This reverts commit 7cb0bc3bc2.
2015-05-21 19:56:52 +02:00
Nathan Sobo
7cb0bc3bc2 Revert "Merge pull request #6757 from atom/ns-less-memory-for-tokens"
This reverts commit 0cd1f110b5, reversing
changes made to d75d202d33.

Conflicts:
	package.json
2015-05-21 16:25:23 +02:00
Nathan Sobo
e694b18ae2 Merge branch 'master' into ns-less-memory-for-tokens
Conflicts:
	spec/tokenized-buffer-spec.coffee
	src/tokenized-buffer.coffee
2015-05-14 18:55:16 +02:00
Max Brunsfeld
19d905606b Avoid double computation of screen lines when opening files
Previously, instantiating a TextEditor would always compute compute
screen lines twice: once when the DisplayBuffer was instantiated,
and once when the 'invisibles' property was set on the DisplayBuffer.
2015-05-13 19:59:25 -07:00
Nathan Sobo
bf6754981b decodeContent -> decodeTokens 2015-05-13 21:17:46 +02:00
Nathan Sobo
b8895cdaaf Update spec based on new interface for Grammar::tokenizeLine 2015-05-13 21:17:45 +02:00
Lee Dohm
be2e340412 Remove focus 2015-04-29 18:16:49 -07:00
Lee Dohm
eda1b743d7 Fix spec to expect whitespace to be removed 2015-04-29 18:14:16 -07:00
Lee Dohm
22c915a8fd Fix most of the specs 2015-04-29 17:52:38 -07:00
CaptSaltyJack
adb017851b Fixed glaring mistake in test spec 2015-04-29 17:09:32 -07:00
CaptSaltyJack
a8283c3c9b Added delete-to-next/previous-word-boundary
This is better behavior for alt-del/backspace operations, is less
"greedy" and doesn't eat up excess characters.
Also set default key mappings to these, feel free to trash my changes
to keymaps/darwin.cson. Though I do feel this should be default
behavior, personally.
2015-04-29 16:31:07 -07:00
Nathan Sobo
ec3f37dee3 Avoid deprecation warnings in spec 2015-04-22 13:12:09 -06:00
Jess Lin
ee7625249f [Gutter] Create event subscription methods for gutter changes 2015-04-22 07:28:57 -07:00
Jess Lin
b361e1719c [Gutter] Add decorateMarker method to Gutter model 2015-04-22 07:28:57 -07:00
Jess Lin
58d6712b0e [Gutter] Augment Decoration to discern the line-number gutter from custom gutters 2015-04-22 07:28:57 -07:00
Jess Lin
eb321a64c1 [Gutter] Create a line-numbers Gutter on each TextEditor 2015-04-22 07:28:56 -07:00
Jess Lin
20d3c07bf5 [Gutter] Add add/get Gutter methods to TextEditor 2015-04-22 07:28:56 -07:00
Antonio Scandurra
1c8cf4390c Rename to safe-clipboard
...and use remote only on Linux renderer processes.
2015-04-14 10:50:09 +02:00
Antonio Scandurra
16dbb7d0bb 🐧 💚 Mock native clipboard appropriately 2015-04-13 12:12:03 +02:00
Kevin Sawicki
4160a8c239 Merge pull request #6230 from mnquintana/coffeelint-plus
Lint for more styleguide errors
2015-04-08 12:07:23 -07:00