Commit Graph

176 Commits

Author SHA1 Message Date
Nathan Sobo
51abab930d Parameterize config on editor instead of using global atom.config 2015-10-07 15:24:58 -05:00
Nathan Sobo
eb2ace37b4 Move TextEditor construction to Workspace
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-07 15:24:56 -05:00
Antonio Scandurra
e648d880ed Manually set rows per page in the model 2015-09-29 08:24:28 +02:00
Antonio Scandurra
575d79acce Merge pull request #8604 from lpommers/pressing-esc-on-multiple-cursors-returns-to-original-cursor-or-selection
Pressing esc on multiple cursors returns to original cursor or selection
2015-09-28 10:01:42 +02:00
Wliu
7c0a656036 🔥 Remove hardcoded Makefile tab behavior 2015-09-26 15:54:51 -04:00
Antonio Scandurra
bded7e4fb0 💚 2015-09-25 12:04:25 +02:00
Antonio Scandurra
91ef57ed29 Merge branch 'master' into as-display-buffer-logical-coordinates
# Conflicts:
#	src/display-buffer.coffee
2015-09-23 18:46:16 +02:00
Antonio Scandurra
d0eabb25fd 🔥 Remove assertion about scrolling 2015-09-23 15:34:42 +02:00
Antonio Scandurra
4136c195c9 Port .scrollToCursorPosition() specs 2015-09-23 15:34:42 +02:00
Antonio Scandurra
0ccb34de42 wip 2015-09-23 15:34:42 +02:00
Antonio Scandurra
25735b2ee1 Port autoscroll when selecting buffer ranges 2015-09-23 15:34:42 +02:00
Antonio Scandurra
7f3160eba6 Port .selectLinesContainingCursors() specs 2015-09-23 15:34:42 +02:00
Antonio Scandurra
57a006d19b Start porting scroll-related specs 2015-09-23 15:34:41 +02:00
Luke Pommersheim
1b07093cff update comments 2015-09-23 11:01:49 +02:00
Luke Pommersheim
6697693d57 Merge remote-tracking branch 'upstream/master' into move-lines-up-and-down-with-multiple-selections 2015-09-23 08:38:37 +02:00
Nathan Sobo
04bda33c10 Don’t use Serializable mixin in TextEditor 2015-09-22 10:37:15 -06:00
Nathan Sobo
78cdd7cb6e 🔥 Remove theorist and TextEditor deprecations 2015-09-22 10:37:13 -06:00
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
Luke Pommersheim
7822e2c676 🌷 change the spec for consolidateSelections 2015-08-31 20:22:24 +02: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