Commit Graph

131 Commits

Author SHA1 Message Date
Antonio Scandurra
ce714b9852 🎨 Rename to ::onDidRequestAutoscroll 2015-09-25 10:57:09 +02:00
Antonio Scandurra
99e77dc09d Port leftover specs from DisplayBuffer 2015-09-24 11:41:02 +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
f1c0658470 🔥 Remove double tested behavior 2015-09-23 15:34:43 +02:00
Antonio Scandurra
49fae9b029 Test that the logical scroll event is triggered 2015-09-23 15:34:43 +02:00
Antonio Scandurra
e75812cfbf 🔥 Remove specs
...as we are already testing a similar behavior in the presenter
2015-09-23 15:34:43 +02:00
Antonio Scandurra
8463d5c59d Start porting DisplayBuffer specs 2015-09-23 15:34:43 +02:00
Nathan Sobo
68fe7026a8 Disable deprecated APIs in specs 2015-09-22 10:37:07 -06:00
Nathan Sobo
eddd84c843 Drop jQuery from spec helper
Some of the global spec-helper methods that depend on jQuery may need
to be removed from package specs, but most should be rare based on my
checks.
2015-09-18 20:48:48 -06:00
Max Brunsfeld
b8aec9db7c Fix display buffer spec for new historied marker behavior 2015-08-25 10:50:05 -07:00
Nathan Sobo
1223d7a154 Process closing scopes at wrap boundaries 2015-08-11 13:13:30 -06:00
Max Brunsfeld
a60f330628 Default maintainHistory marker option to false 2015-07-21 13:27:05 -07:00
aki
449c03cb35 Fix destroy listeners 2015-06-16 18:05:45 +09:00
Machiste Quintana
d5bcc0433d WIP: 👕 Fix linter errors 2015-05-22 16:29:12 -04:00
Nathan Sobo
865015e47d Correctly compute bufferDelta for last soft wrap line segment
Fixes #6885
2015-05-21 19:56:53 +02:00
Max Brunsfeld
2bfbb7619e Fix bug w/ markers mutated inside of change listeners 2015-05-19 17:48:53 -07:00
Max Brunsfeld
a1cc35b270 Fix DisplayBuffer spec
Marker updates now happen after all buffer changes
2015-05-19 15:18:20 -07:00
Jess Lin
cdca9c3ef1 [Gutter] Fix coffeescript style issues 2015-04-22 07:29:00 -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
Jesse Grosjean
409775b53e Improved specs for clipping pixel positions above/below display buffer 2015-04-01 12:39:22 -04:00
Jesse Grosjean
b067a6175f add screenPositionForPixelPosition spec 2015-03-30 13:52:28 -04:00
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
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
Nathan Sobo
2bfd30c832 Revert "Revert "Don't soft-wrap on indentation"" 2015-03-19 14:37:39 -06:00
Nathan Sobo
6345799cf3 Revert "Don't soft-wrap on indentation" 2015-03-19 12:47:58 -06:00
Antonio Scandurra
56020b11b0 🐛 Avoid soft-wrapping on indentation 2015-03-19 11:36:55 +01: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
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
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
Antonio Scandurra
efefc0dc66 DisplayBuffer#getEditorWidthInChars must always be >= 0 2015-02-27 00:55:03 +01:00
Nathan Sobo
c9ce9f41c2 Merge pull request #5567 from as-cii/indent-soft-wrap
Indent soft wrap
2015-02-25 19:06:35 -07:00
Nathan Sobo
5fdb3cde08 Fix ::longestScreenRow update for changes directly above longest line
Fixes #5716
2015-02-24 11:36:01 -07:00
Antonio Scandurra
0258531a3c Use softWrapIndentation name consistently 2015-02-20 10:28:27 +01: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
ed77358515 Show guide on soft wrapped lines with indentation
* Rename phantomToken to softWrapIndent and use it consistently
* Build multiple softWrapIndent tokens in order to show guides
* Memoize softWrapIndentTokens and softWrapIndentDelta
2015-02-20 09:29:37 +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
67ef17e0c8 💚 Fix soft wrapping scroll spec 2015-02-19 16:23:59 +01:00
Antonio Scandurra
85e202ee0a Get rid of wrapAtPhantomTokens 2015-02-19 16:23:51 +01:00
Antonio Scandurra
8184ad9a77 Ensure phantom tabs are correctly tokenized 2015-02-18 21:31:00 +01:00