Commit Graph

158 Commits

Author SHA1 Message Date
Ivan Zuzak
bed902e7df Just test everything with soft wrap on 2015-09-18 12:42:06 +02:00
Ivan Zuzak
7e1a295f07 Add method for cutting text to the end of the buffer line 2015-09-17 19:34:53 +02:00
Nathan Sobo
3ca11c2cef 🎨 select-line adjustments; Only select single row if row is given 2015-09-03 08:25:24 -06:00
jc roy
361ef308e2 SelectLine : When multiple line selected, complete both first and last line. 2015-09-02 20:03:18 -04:00
Nathan Sobo
c7cc404c42 Simplify page-up/page-down
We simply move the cursor up or down by the number of whole lines that
fit on screen, allowing autoscroll to adjust the scroll position. This
causes there to be a margin under the location to which we move the
cursor, but I think it’s better to provide context and keep the
autoscroll experience consistent when using the keyboard.
2015-08-28 13:39:14 -06:00
Nathan Sobo
4bbc1d806e Create a selection automatically as needed if the last one was destroyed
Fixes atom/bracket-matcher#102
2015-08-26 17:59:33 -06:00
Max Brunsfeld
f57da0c6f8 Suppress merging selections during undo/redo
Now, during undo/redo overlapping selections will be temporarily
created as markers are created via snapshots. Old selections will
immediately be destroyed though, since undo/redo now completely
replace all historied markers w/ those in the snapshot, so there
is no need to merge selections.
2015-08-25 10:51:45 -07:00
Max Brunsfeld
7e197060bc Merge pull request #8025 from lpommers/copy-selection-to-clipboard
Copy selection command to only write to clipboard if text selected
2015-08-18 09:25:59 -07:00
Luke Pommersheim
e96d6f50ad 🎨 newlines fix 2015-08-18 18:22:18 +02:00
Luke Pommersheim
1a965edd00 🌷 spec more specific 2015-08-18 17:09:23 +02:00
Ben Ogle
51538b0c67 Don’t need this coffeeEditor 2015-08-12 17:48:52 -07:00
Ben Ogle
1b727c1862 Handle a grammar change for @softTabs 2015-08-12 17:32:05 -07:00
Ben Ogle
b5d253b9c5 Add a spec for the scoped setting 2015-08-12 17:23:15 -07:00
Ben Ogle
1192008479 Update the tab type when the setting changes 2015-08-12 17:21:53 -07:00
Ben Ogle
b3ea638de3 Add a bunch of specs for tabType setting 2015-08-12 17:10:43 -07:00
Ben Ogle
71f6cd0a0f Get some base tests setup 2015-08-12 16:43:53 -07:00
Ben Ogle
d9d442b723 Consolidate tab specs 2015-08-12 16:30:14 -07:00
Nathan Sobo
f9a576b0ce Allow Infinity for initialLine/Column; move specs to workspace
The initialLine and initialColumn behavior belongs on workspace.
2015-08-10 11:32:38 -06:00
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