Commit Graph

5342 Commits

Author SHA1 Message Date
Nikolaus Wittenstein
b28ee92896 Add tests for DisplayBuffer::screenPositionForBufferPosition around soft tabs
This makes sure that a buffer position in the middle of a soft tab will
correctly clip to the closest edge by default.
2015-03-29 19:43:25 -04: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
Nikolaus Wittenstein
372fb49c88 TokenizedLine::screenColumnForBufferColumn calculates more accurately
screenColumnForBufferColumn used to break only if the current column
was strictly greater than the target column. This commit changes it so
it breaks when greater or equal, which is how bufferColumnForScreenColumn
works.

This also adds some unit tests for screenColumnForBufferColumn's
interactions with hard tab characters.
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
Kevin Sawicki
ffdf7ac558 Remove unneeded failed count check 2015-03-26 16:36:01 -07:00
Kevin Sawicki
c2fecacdbe Fail CI build when deprecations exist 2015-03-26 16:36:01 -07:00
Nathan Sobo
127e0fbf6b Merge pull request #6114 from atom/mb-ns-fix-autoscroll
Fix autoscroll on undo
2015-03-26 17:34:39 -06: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
Kevin Sawicki
14d1fc2269 Merge pull request #5898 from basarat/master
Transpile all .ts files
2015-03-26 14:33:04 -07: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
Basarat Syed
6f1b061dac Added TypeScript to the compile-cache 2015-03-24 18:05:30 +11:00
Cheng Zhao
2620c95d86 String.contains is not a standard method in Chrome 41 2015-03-24 12:06:03 +08:00
Michael Bolin
14316b1cd7 Add Repository::getType().
For `GitRepository`, this will return `"git"`.
2015-03-23 15:38:38 -07:00
Nathan Sobo
5f76979fc8 Fix random editor spec now for indented soft-wrap
We previously implemented soft-wrap logic again just for this test.
Since the purpose of this test is just to make sure that mutation occurs
correctly, we now instead construct a fresh editor for comparison so
that changes to soft-wrap logic are reflected.

/cc @as-cii Took care of this, so you don’t need to worry about my
previous comment on your PR. Sorry for the noise.
2015-03-19 15:08:48 -06:00
Jessica Lord
390e95e220 Merge branch 'master' into jlks-missing-services-fix 2015-03-19 10:19:56 -07:00
Antonio Scandurra
61cc9b97ea 💚 Fix failing spec 2015-03-19 11:45:54 +01:00
Antonio Scandurra
56020b11b0 🐛 Avoid soft-wrapping on indentation 2015-03-19 11:36:55 +01:00
Basarat Syed
c2f258c679 Addressed code review 2015-03-19 11:45:13 +11:00
Jessica Lord
2c46748307 add spec to check missing service methods are skipped
Signed-off-by: Kevin Sawicki <kevin@github.com>
2015-03-18 15:38:13 -07:00
Jessica Lord
cac361e6df add packages for new spec
Signed-off-by: Kevin Sawicki <kevin@github.com>
2015-03-18 15:34:28 -07:00
Nathan Sobo
609a661174 Merge pull request #6010 from atom/as-soft-wrap-hanging-indent
Soft wrap hanging indentation spaces
2015-03-18 11:39:27 -06:00
Antonio Scandurra
fbfe19825b Even more descriptive specs 2015-03-18 18:00:31 +01:00
Antonio Scandurra
8559526215 Write a more comprehensive spec 2015-03-18 17:42:25 +01:00
Antonio Scandurra
7c33b9bf41 🎨 Rename to softWrapHangingIndent 2015-03-18 14:18:27 +01:00
Antonio Scandurra
f0b9bb7ce3 Show indent guides on hanging indentation too 2015-03-18 11:17:34 +01:00
Basarat Syed
8793bebfab tests for typescript transpiling 2015-03-18 17:53:15 +11:00
Kevin Sawicki
cd5adb6ab7 Clear invalid rows when short-circuiting for null grammar 2015-03-17 17:41:22 -07:00
Kevin Sawicki
eb63556b27 Use - in socket file name 2015-03-17 16:51:52 -07:00
Kevin Sawicki
a64e1c9ca8 Merge pull request #5960 from Bjoernsen/patch-1
Enable multiple users
2015-03-17 16:50:00 -07:00
Antonio Scandurra
6ac8af2a6e Check leading spaces as well 2015-03-17 22:58:14 +01:00
Antonio Scandurra
6d39bd3657 Verify that hanging indentation is tokenized 2015-03-17 22:21:07 +01:00
Kevin Sawicki
46e881739c Set themes names at beginning of spec 2015-03-16 15:11:12 -07:00
Nathan Sobo
010154f802 Merge pull request #5959 from atom/as-fix-select-above-below
Use screen ranges to select above and below
2015-03-16 11:26:54 -06:00
Bjoernsen
d6338b0a2c Update start-atom.coffee 2015-03-16 08:38:01 +01:00
Antonio Scandurra
6633c90af8 Use buffer ranges when merging selections 2015-03-14 10:05:04 +01:00
Antonio Scandurra
0a23a21953 🎨 Get rid of goalBufferRange 2015-03-14 09:48:19 +01:00
Antonio Scandurra
bfe8f7c740 Fix soft-wrapping specs 2015-03-14 09:26:35 +01:00
Max Brunsfeld
587ebd7538 Fix Project::relativePath w/ URLs 2015-03-13 15:07:56 -07:00
Max Brunsfeld
eb355118ad Merge pull request #5961 from atom/mb-batch-services-providers-by-package
Batch service providers by package
2015-03-13 13:28:41 -07:00
Max Brunsfeld
7ec46933bd Batch service providers by package 2015-03-13 11:42:30 -07:00
Nathan Sobo
a4257ed513 Merge pull request #5936 from atom/as-destroy-containing-folds-on-selection
Destroy only containing folds on selection
2015-03-13 11:28:46 -07:00
Antonio Scandurra
8ac4848805 Skip soft-wrap indentation tokens while selecting
* 🎨 Restructure specs a bit
*  Write specs for this new behavior
2015-03-13 12:05:18 +01:00
Antonio Scandurra
c319b80464 Write specs for atomic tokens 2015-03-13 11:56:00 +01:00
Antonio Scandurra
02ad2e8ff7 Write specs for soft-wrapped lines selection 2015-03-13 11:32:42 +01:00
Antonio Scandurra
3b5a0b292d 📝 Better and consistent naming across specs and docs 2015-03-12 12:32:59 +01:00
Antonio Scandurra
faa2944232 Cover edge case scenario
...where buffer rows are less than rows fitting on screen
2015-03-12 10:33:19 +01:00
Antonio Scandurra
912dd732a9 🎨 Uniform new tests structure 2015-03-12 10:17:26 +01:00
Antonio Scandurra
9f1bb82451 Adjust DisplayBuffer#getVisibleRowRange logic
This fixes #4596, where the calculation returned a wrong range.

* 📝 State clearly that we'll return a closed interval in docs
*  Write tests to ensure a correct behavior
2015-03-12 10:08:02 +01:00