Nathan Sobo
0d310c767f
Splice in new DisplayBuffer lines in chunks to avoid stack overflows
2015-05-08 19:23:45 +02:00
Max Brunsfeld
5b8262bd96
🐎 Avoid repeated array allocation in ::getDecorations
2015-05-07 12:56:29 -07:00
Machiste Quintana
5d2392ea67
👕 Fix new coffeelint errors
2015-04-06 23:59:54 -04:00
Kevin Sawicki
6e3bdd2daf
Return value from scroll top/left setters
2015-04-06 13:38:34 -07:00
Kevin Sawicki
72678df7fc
Use new Model superclass in DisplayBuffer
2015-04-06 13:25:55 -07:00
Kevin Sawicki
7d592c8b78
includeDeprecations -> includeDeprecatedAPIs
2015-04-03 11:29:16 -07:00
Kevin Sawicki
23d1c72a5f
Remove unused imports
2015-04-03 11:29:14 -07:00
Kevin Sawicki
8eded9f9bd
Use disposables in DisplayBuffer
2015-04-03 11:29:13 -07:00
Kevin Sawicki
193ab71aca
Call dispose instead of unsubscribe on marker
2015-04-03 11:29:13 -07:00
Kevin Sawicki
15c48c5388
Conditionally include deprecations in DisplayBuffer
2015-04-03 11:29:11 -07:00
Jesse Grosjean
0fe1ea1af3
Target 0 instead of -Infinity to make the code a bit clearer.
2015-04-02 12:25:16 -04:00
Jesse Grosjean
4a864e79dc
Fix screenPositionForPixelPosition for case above first row.
...
Currently screenPositionForPixelPosition special cases pixel positions
below the last row so that the column position is always set to the
last column of the last line, even if the pixel 'x' position is less
then that column.
This patch special cases picks above the first row so that the text
column position will be in the first column even if the pixel 'x'
position is greater then that column.
At a higher level, this patch fixes the problem where you can’t select
to the start of a text field by just clicking and dragging up. Instead
you have to click and drag back (x axis) beyond the start of the text
field.
2015-03-30 13:09:30 -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
Kevin Sawicki
590a4b0fd5
Add explicit return after for loop
2015-03-19 11:48:40 -07:00
Antonio Scandurra
f5e1e40edd
Avoid named parameter to save an allocation
2015-03-18 17:44:35 +01:00
Antonio Scandurra
7c33b9bf41
🎨 Rename to softWrapHangingIndent
2015-03-18 14:18:27 +01:00
Antonio Scandurra
67b1d7890b
Add soft-wrap hanging indentation spaces
2015-03-17 22:05:43 +01:00
Antonio Scandurra
f4b791d33b
Use screenPosition to select above and below
2015-03-13 10:57:45 +01:00
Antonio Scandurra
3b5a0b292d
📝 Better and consistent naming across specs and docs
2015-03-12 12:32:59 +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
79c16a0d00
Use softWrapAtNewLines in moveDown and moveUp
...
/cc: @nathansobo
2015-02-19 20:01:37 +01:00
Antonio Scandurra
85e202ee0a
Get rid of wrapAtPhantomTokens
2015-02-19 16:23:51 +01:00
Antonio Scandurra
e5eaa25381
Wrap at phantom tokens only when moving cursor left
...
This prevents a weird behavior that affects selection. Before this commit, when
moving the cursor down, if it was inside a real (soft|hard)-tab of a soft
wrapped line, it would reach the end of the line rather than the beginning of
the next wrapped line.
/cc: @nathansobo
2015-02-18 18:58:43 +01:00
Antonio Scandurra
62434d9ad5
Move findWrapColumn into TokenizedLine
...
* 🐎 Check `isSoftWrapped` only once when updating screen lines
2015-02-18 10:05:48 +01:00
Antonio Scandurra
b0c670b80a
Better naming
...
...thanks @nathansobo
2015-02-18 09:52:23 +01:00
Antonio Scandurra
38118b66cb
Do not rely on text anymore, check phantom tokens instead
2015-02-16 15:49:00 +01:00
Antonio Scandurra
131048af65
Use intention-revealing method names
2015-02-16 15:48:59 +01:00
Antonio Scandurra
abd143a255
Extract phantom token recognition into TokenizedLine
2015-02-16 14:33:37 +01:00
Antonio Scandurra
469876161a
Improve TokenizedLine#clipScreenColumn
2015-02-16 12:53:09 +01:00
Antonio Scandurra
5ce01118be
Cover edge cases
2015-02-16 12:30:00 +01:00
Antonio Scandurra
fb21cf6123
Wrap appropriately
2015-02-15 12:33:34 +01:00
Antonio Scandurra
7f1bb69580
Initial attempt
2015-02-14 19:04:53 +01:00
Kevin Sawicki
582b819efa
Remove unused guid dependency
2015-02-12 16:30:32 -08:00
Nathan Sobo
3656d4cca6
Pass options in DisplayBuffer::screenRangeForBufferRange
2015-02-04 08:42:34 -07:00
Nathan Sobo
5d2efc0469
Deprecate TextEditor::getGutterDecorations
...
Forgot to rename it when we renamed decorations of type ‘gutter’ to
‘line-number’. It’s not used in core or any packages at the time of
this commit.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2015-02-03 15:05:22 -07:00
Nathan Sobo
8c574bfd30
Rename 'gutter' decorations to 'line-number' decorations
2015-01-14 19:49:46 -07:00
Max Brunsfeld
a1b4820c04
Revert "Revert "Merge pull request #4631 ""
...
This reverts commit dc2a453986 .
Conflicts:
spec/config-spec.coffee
src/config.coffee
2014-12-23 09:26:40 -08:00
Max Brunsfeld
dc2a453986
Revert "Merge pull request #4631 from atom/mb-new-config-api"
...
This reverts commit 5147fb6a8b , reversing
changes made to 9bbbb58084 .
2014-12-16 15:27:39 -08:00
Max Brunsfeld
2cea51b50e
Take 'scope' option in Config::onDidChange
...
Deprecate passing the scope as an optional first argument
2014-12-16 14:00:57 -08:00
Max Brunsfeld
4e4794f3fd
Take 'scope' option in Config::observe
...
Deprecate using the scope as an optional first argument
2014-12-16 14:00:57 -08:00
Nathan Sobo
c58606907a
Make scope a trailing option to Config::get
2014-12-16 14:00:56 -08:00
Nathan Sobo
7422f4378e
Add property filters to TextEditor::getDecorations methods
...
This makes it much easier to write tests that inspect the state of
decorations.
2014-12-10 19:11:50 -07:00
Nathan Sobo
dd63d47c11
Add getters for decoration types in addition to ‘overlay’
2014-12-02 15:59:12 -07:00