From e648d880edb6c2715e588e86d91383b526615b36 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 29 Sep 2015 08:24:28 +0200 Subject: [PATCH 01/10] Manually set rows per page in the model --- spec/text-editor-presenter-spec.coffee | 14 ++++++++++++++ spec/text-editor-spec.coffee | 8 ++++---- src/text-editor-presenter.coffee | 1 + src/text-editor.coffee | 4 +++- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/spec/text-editor-presenter-spec.coffee b/spec/text-editor-presenter-spec.coffee index 1a2f8badc..ef8f2f784 100644 --- a/spec/text-editor-presenter-spec.coffee +++ b/spec/text-editor-presenter-spec.coffee @@ -2026,6 +2026,20 @@ describe "TextEditorPresenter", -> } describe ".height", -> + it "updates model's rows per page when it changes", -> + presenter = buildPresenter(explicitHeight: 50, lineHeightInPixels: 10, horizontalScrollbarHeight: 10) + + presenter.getState() # trigger state update + expect(editor.getRowsPerPage()).toBe(4) + + presenter.setExplicitHeight(100) + presenter.getState() # trigger state update + expect(editor.getRowsPerPage()).toBe(9) + + presenter.setHorizontalScrollbarHeight(0) + presenter.getState() # trigger state update + expect(editor.getRowsPerPage()).toBe(10) + it "tracks the computed content height if ::autoHeight is true so the editor auto-expands vertically", -> presenter = buildPresenter(explicitHeight: null, autoHeight: true) expect(presenter.getState().height).toBe editor.getScreenLineCount() * 10 diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index 59b8a218e..e95818900 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -4365,8 +4365,8 @@ describe "TextEditor", -> describe ".pageUp/Down()", -> it "moves the cursor down one page length", -> - editor.setLineHeightInPixels(10) - editor.setHeight(50, true) + editor.setRowsPerPage(5) + expect(editor.getCursorBufferPosition().row).toBe 0 editor.pageDown() @@ -4383,8 +4383,8 @@ describe "TextEditor", -> describe ".selectPageUp/Down()", -> it "selects one screen height of text up or down", -> - editor.setLineHeightInPixels(10) - editor.setHeight(50, true) + editor.setRowsPerPage(5) + expect(editor.getCursorBufferPosition().row).toBe 0 editor.selectPageDown() diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index 658d1672c..4cc119d41 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -688,6 +688,7 @@ class TextEditorPresenter clientHeight = @height - @horizontalScrollbarHeight @model.setHeight(clientHeight, true) + @model.setRowsPerPage(Math.floor(clientHeight / @lineHeight)) unless @clientHeight is clientHeight @clientHeight = clientHeight diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 4c05bbf41..29f34f379 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -2895,7 +2895,9 @@ class TextEditor extends Model # Returns the number of rows per page getRowsPerPage: -> - Math.max(1, Math.floor(@getHeight() / @getLineHeightInPixels())) + Math.max(@rowsPerPage ? 1, 1) + + setRowsPerPage: (@rowsPerPage) -> ### Section: Config From f877f3695da7db9471a1d7ddc594e4b15e5d78f4 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 29 Sep 2015 08:25:51 +0200 Subject: [PATCH 02/10] Revert "Temporarily un-deprecate TextEditor methods" This reverts commit 8fb4e887df800438b2deeb23a2c23004b9ff358a. --- src/text-editor.coffee | 87 ++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 58 deletions(-) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 29f34f379..eb47484df 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -427,14 +427,12 @@ class TextEditor extends Model @displayBuffer.onDidChangeCharacterWidths(callback) onDidChangeScrollTop: (callback) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::onDidChangeScrollTop instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::onDidChangeScrollTop instead.") atom.views.getView(this).onDidChangeScrollTop(callback) onDidChangeScrollLeft: (callback) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::onDidChangeScrollLeft instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::onDidChangeScrollLeft instead.") atom.views.getView(this).onDidChangeScrollLeft(callback) @@ -2856,28 +2854,24 @@ class TextEditor extends Model @displayBuffer.scrollToScreenPosition(screenPosition, options) scrollToTop: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::scrollToTop instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::scrollToTop instead.") atom.views.getView(this).scrollToTop() scrollToBottom: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::scrollToTop instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::scrollToTop instead.") atom.views.getView(this).scrollToBottom() scrollToScreenRange: (screenRange, options) -> @displayBuffer.scrollToScreenRange(screenRange, options) getHorizontalScrollbarHeight: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getHorizontalScrollbarHeight instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getHorizontalScrollbarHeight instead.") atom.views.getView(this).getHorizontalScrollbarHeight() getVerticalScrollbarWidth: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getVerticalScrollbarWidth instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getVerticalScrollbarWidth instead.") atom.views.getView(this).getVerticalScrollbarWidth() @@ -2945,23 +2939,19 @@ class TextEditor extends Model @emitter.emit 'did-change-placeholder-text', @placeholderText getFirstVisibleScreenRow: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getFirstVisibleScreenRow instead.") + deprecate("This is now a view method. Call TextEditorElement::getFirstVisibleScreenRow instead.") atom.views.getView(this).getVisibleRowRange()[0] getLastVisibleScreenRow: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getLastVisibleScreenRow instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getLastVisibleScreenRow instead.") atom.views.getView(this).getVisibleRowRange()[1] pixelPositionForBufferPosition: (bufferPosition) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This method is deprecated on the model layer. Use `TextEditorElement::pixelPositionForBufferPosition` instead") + Grim.deprecate("This method is deprecated on the model layer. Use `TextEditorElement::pixelPositionForBufferPosition` instead") atom.views.getView(this).pixelPositionForBufferPosition(bufferPosition) pixelPositionForScreenPosition: (screenPosition) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This method is deprecated on the model layer. Use `TextEditorElement::pixelPositionForScreenPosition` instead") + Grim.deprecate("This method is deprecated on the model layer. Use `TextEditorElement::pixelPositionForScreenPosition` instead") atom.views.getView(this).pixelPositionForScreenPosition(screenPosition) getSelectionMarkerAttributes: -> @@ -2992,13 +2982,11 @@ class TextEditor extends Model if reentrant @displayBuffer.setHeight(height) else - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::setHeight instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::setHeight instead.") atom.views.getView(this).setHeight(height) getHeight: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getHeight instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getHeight instead.") @displayBuffer.getHeight() getClientHeight: -> @displayBuffer.getClientHeight() @@ -3007,13 +2995,11 @@ class TextEditor extends Model if reentrant @displayBuffer.setWidth(width) else - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::setWidth instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::setWidth instead.") atom.views.getView(this).setWidth(width) getWidth: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getWidth instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getWidth instead.") @displayBuffer.getWidth() getScrollRow: -> @scrollRow @@ -3023,92 +3009,77 @@ class TextEditor extends Model setScrollColumn: (@scrollColumn) -> getScrollTop: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollTop instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollTop instead.") atom.views.getView(this).getScrollTop() setScrollTop: (scrollTop) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollTop instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollTop instead.") atom.views.getView(this).setScrollTop(scrollTop) getScrollBottom: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollBottom instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollBottom instead.") atom.views.getView(this).getScrollBottom() setScrollBottom: (scrollBottom) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollBottom instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollBottom instead.") atom.views.getView(this).setScrollBottom(scrollBottom) getScrollLeft: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollLeft instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollLeft instead.") atom.views.getView(this).getScrollLeft() setScrollLeft: (scrollLeft) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollLeft instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollLeft instead.") atom.views.getView(this).setScrollLeft(scrollLeft) getScrollRight: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollRight instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollRight instead.") atom.views.getView(this).getScrollRight() setScrollRight: (scrollRight) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollRight instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::setScrollRight instead.") atom.views.getView(this).setScrollRight(scrollRight) getScrollHeight: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollHeight instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollHeight instead.") atom.views.getView(this).getScrollHeight() getScrollWidth: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollWidth instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getScrollWidth instead.") atom.views.getView(this).getScrollWidth() getVisibleRowRange: -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::getVisibleRowRange instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::getVisibleRowRange instead.") atom.views.getView(this).getVisibleRowRange() intersectsVisibleRowRange: (startRow, endRow) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::intersectsVisibleRowRange instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::intersectsVisibleRowRange instead.") atom.views.getView(this).intersectsVisibleRowRange(startRow, endRow) selectionIntersectsVisibleRowRange: (selection) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::selectionIntersectsVisibleRowRange instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::selectionIntersectsVisibleRowRange instead.") atom.views.getView(this).selectionIntersectsVisibleRowRange(selection) screenPositionForPixelPosition: (pixelPosition) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::screenPositionForPixelPosition instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::screenPositionForPixelPosition instead.") atom.views.getView(this).screenPositionForPixelPosition(pixelPosition) pixelRectForScreenRange: (screenRange) -> - # TODO: put back once core & bundled packages are updated not to use this. - # Grim.deprecate("This is now a view method. Call TextEditorElement::pixelRectForScreenRange instead.") + Grim.deprecate("This is now a view method. Call TextEditorElement::pixelRectForScreenRange instead.") atom.views.getView(this).pixelRectForScreenRange(screenRange) From 550a1c7922b5c9abee013e16a7f4018bc1dbeeb4 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 29 Sep 2015 08:52:02 +0200 Subject: [PATCH 03/10] Fail on Travis when deprecated methods are used --- spec/jasmine-helper.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/jasmine-helper.coffee b/spec/jasmine-helper.coffee index f165bd220..74e4a0384 100644 --- a/spec/jasmine-helper.coffee +++ b/spec/jasmine-helper.coffee @@ -23,7 +23,7 @@ module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) -> log(str) onComplete: (runner) -> fs.closeSync(logStream) if logStream? - if process.env.JANKY_SHA1 + if process.env.JANKY_SHA1 or process.env.CI grim = require 'grim' if grim.getDeprecationsLength() > 0 From 5cfc5b67ae3d1a07dc08d08597f24f547c305c3b Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 30 Sep 2015 09:05:06 +0200 Subject: [PATCH 04/10] Allow listening for TextEditorElement events before attaching it Fixes atom/wrap-guide#43 /cc: @maxbrunsfeld --- spec/text-editor-element-spec.coffee | 58 ++++++++++++++++++++++++++++ src/text-editor-element.coffee | 34 ++++++++++------ 2 files changed, 80 insertions(+), 12 deletions(-) diff --git a/spec/text-editor-element-spec.coffee b/spec/text-editor-element-spec.coffee index 55b164d79..148199425 100644 --- a/spec/text-editor-element-spec.coffee +++ b/spec/text-editor-element-spec.coffee @@ -243,3 +243,61 @@ describe "TextEditorElement", -> expect(element.hasAttribute('mini')).toBe true element.getModel().setMini(false) expect(element.hasAttribute('mini')).toBe false + + describe "events", -> + element = null + + beforeEach -> + element = new TextEditorElement + element.getModel().setText("lorem\nipsum\ndolor\nsit\namet") + element.setUpdatedSynchronously(true) + element.setHeight(20) + element.setWidth(20) + + describe "::onDidChangeScrollTop(callback)", -> + it "triggers even when subscribing before attaching the element", -> + positions = [] + subscription1 = element.onDidChangeScrollTop (p) -> positions.push(p) + jasmine.attachToDOM(element) + subscription2 = element.onDidChangeScrollTop (p) -> positions.push(p) + + positions.length = 0 + element.setScrollTop(10) + expect(positions).toEqual([10, 10]) + + element.remove() + jasmine.attachToDOM(element) + + positions.length = 0 + element.setScrollTop(20) + expect(positions).toEqual([20, 20]) + + subscription1.dispose() + + positions.length = 0 + element.setScrollTop(30) + expect(positions).toEqual([30]) + + describe "::onDidChangeScrollLeft(callback)", -> + it "triggers even when subscribing before attaching the element", -> + positions = [] + subscription1 = element.onDidChangeScrollLeft (p) -> positions.push(p) + jasmine.attachToDOM(element) + subscription2 = element.onDidChangeScrollLeft (p) -> positions.push(p) + + positions.length = 0 + element.setScrollLeft(10) + expect(positions).toEqual([10, 10]) + + element.remove() + jasmine.attachToDOM(element) + + positions.length = 0 + element.setScrollLeft(20) + expect(positions).toEqual([20, 20]) + + subscription1.dispose() + + positions.length = 0 + element.setScrollLeft(30) + expect(positions).toEqual([30]) diff --git a/src/text-editor-element.coffee b/src/text-editor-element.coffee index fa65b400e..17903b76f 100644 --- a/src/text-editor-element.coffee +++ b/src/text-editor-element.coffee @@ -1,4 +1,4 @@ -{Emitter} = require 'event-kit' +{Emitter, CompositeDisposable} = require 'event-kit' Path = require 'path' {defaults} = require 'underscore-plus' TextBuffer = require 'text-buffer' @@ -18,6 +18,7 @@ class TextEditorElement extends HTMLElement createdCallback: -> @emitter = new Emitter + @subscriptions = new CompositeDisposable @initializeContent() @addEventListener 'focus', @focused.bind(this) @addEventListener 'blur', @blurred.bind(this) @@ -56,6 +57,7 @@ class TextEditorElement extends HTMLElement @buildModel() unless @getModel()? atom.assert(@model.isAlive(), "Attaching a view for a destroyed editor") @mountComponent() unless @component? + @listenForComponentEvents() @component.checkForVisibilityChange() if this is document.activeElement @focused() @@ -63,8 +65,16 @@ class TextEditorElement extends HTMLElement detachedCallback: -> @unmountComponent() + @subscriptions.dispose() + @subscriptions = new CompositeDisposable @emitter.emit("did-detach") + listenForComponentEvents: -> + @subscriptions.add @component.onDidChangeScrollTop => + @emitter.emit("did-change-scroll-top", arguments...) + @subscriptions.add @component.onDidChangeScrollLeft => + @emitter.emit("did-change-scroll-left", arguments...) + initialize: (model) -> @setModel(model) this @@ -219,10 +229,10 @@ class TextEditorElement extends HTMLElement @emitter.on("did-detach", callback) onDidChangeScrollTop: (callback) -> - @component.onDidChangeScrollTop(callback) + @emitter.on("did-change-scroll-top", callback) onDidChangeScrollLeft: (callback) -> - @component.onDidChangeScrollLeft(callback) + @emitter.on("did-change-scroll-left", callback) setScrollLeft: (scrollLeft) -> @component.setScrollLeft(scrollLeft) @@ -245,31 +255,31 @@ class TextEditorElement extends HTMLElement @setScrollBottom(Infinity) getScrollTop: -> - @component.getScrollTop() + @component?.getScrollTop() or 0 getScrollLeft: -> - @component.getScrollLeft() + @component?.getScrollLeft() or 0 getScrollRight: -> - @component.getScrollRight() + @component?.getScrollRight() or 0 getScrollBottom: -> - @component.getScrollBottom() + @component?.getScrollBottom() or 0 getScrollHeight: -> - @component.getScrollHeight() + @component?.getScrollHeight() or 0 getScrollWidth: -> - @component.getScrollWidth() + @component?.getScrollWidth() or 0 getVerticalScrollbarWidth: -> - @component.getVerticalScrollbarWidth() + @component?.getVerticalScrollbarWidth() or 0 getHorizontalScrollbarHeight: -> - @component.getHorizontalScrollbarHeight() + @component?.getHorizontalScrollbarHeight() or 0 getVisibleRowRange: -> - @component.getVisibleRowRange() + @component?.getVisibleRowRange() or 0 intersectsVisibleRowRange: (startRow, endRow) -> [visibleStart, visibleEnd] = @getVisibleRowRange() From cc98cab917becef92a22b78972e7eb989b9b44f1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 30 Sep 2015 09:17:43 +0200 Subject: [PATCH 05/10] Better rows per page calculation --- spec/text-editor-presenter-spec.coffee | 4 ++++ src/text-editor-presenter.coffee | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/text-editor-presenter-spec.coffee b/spec/text-editor-presenter-spec.coffee index ef8f2f784..d9f558187 100644 --- a/spec/text-editor-presenter-spec.coffee +++ b/spec/text-editor-presenter-spec.coffee @@ -2040,6 +2040,10 @@ describe "TextEditorPresenter", -> presenter.getState() # trigger state update expect(editor.getRowsPerPage()).toBe(10) + presenter.setLineHeight(5) + presenter.getState() # trigger state update + expect(editor.getRowsPerPage()).toBe(20) + it "tracks the computed content height if ::autoHeight is true so the editor auto-expands vertically", -> presenter = buildPresenter(explicitHeight: null, autoHeight: true) expect(presenter.getState().height).toBe editor.getScreenLineCount() * 10 diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index 4cc119d41..3d4ba6a36 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -72,6 +72,7 @@ class TextEditorPresenter @updateScrollPosition() @updateStartRow() @updateEndRow() + @updateRowsPerPage() @updateCommonGutterState() @updateReflowState() @@ -641,6 +642,12 @@ class TextEditorPresenter endRow = startRow + visibleLinesCount @endRow = Math.min(@model.getScreenLineCount(), endRow) + updateRowsPerPage: -> + rowsPerPage = Math.floor(@getClientHeight() / @lineHeight) + if rowsPerPage isnt @rowsPerPage + @rowsPerPage = rowsPerPage + @model.setRowsPerPage(@rowsPerPage) + updateScrollWidth: -> return unless @contentWidth? and @clientWidth? @@ -688,7 +695,6 @@ class TextEditorPresenter clientHeight = @height - @horizontalScrollbarHeight @model.setHeight(clientHeight, true) - @model.setRowsPerPage(Math.floor(clientHeight / @lineHeight)) unless @clientHeight is clientHeight @clientHeight = clientHeight From 5cb63c8b90fcc789a98f316c0261e496a3241708 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 30 Sep 2015 10:16:47 +0200 Subject: [PATCH 06/10] Add feature flag to detect logical display buffer --- src/text-editor-element.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/text-editor-element.coffee b/src/text-editor-element.coffee index 17903b76f..ae30f2b2e 100644 --- a/src/text-editor-element.coffee +++ b/src/text-editor-element.coffee @@ -15,6 +15,7 @@ class TextEditorElement extends HTMLElement tileSize: null focusOnAttach: false hasTiledRendering: true + logicalDisplayBuffer: true createdCallback: -> @emitter = new Emitter From e68aab10ac8d2c61528e4b89ea3df784443f272f Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 30 Sep 2015 10:24:56 +0200 Subject: [PATCH 07/10] :arrow_up: symbols-view --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08441ea67..b22c5e0db 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "spell-check": "0.61.0", "status-bar": "0.79.0", "styleguide": "0.44.0", - "symbols-view": "0.108.0", + "symbols-view": "0.109.0", "tabs": "0.84.0", "timecop": "0.33.0", "tree-view": "0.189.0", From df69aa7d9362ecbe3da141993959c789dcdbb676 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 30 Sep 2015 10:27:28 +0200 Subject: [PATCH 08/10] :arrow_up: find-and-replace --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b22c5e0db..9d07b7ea1 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "dev-live-reload": "0.47.0", "encoding-selector": "0.21.0", "exception-reporting": "0.37.0", - "find-and-replace": "0.182.0", + "find-and-replace": "0.183.0", "fuzzy-finder": "0.90.0", "git-diff": "0.56.0", "go-to-line": "0.30.0", From 8bed86f020e77b36139764204bede1143710625e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 30 Sep 2015 10:32:15 +0200 Subject: [PATCH 09/10] :arrow_up: wrap-guide --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d07b7ea1..857c126b4 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "update-package-dependencies": "0.10.0", "welcome": "0.30.0", "whitespace": "0.31.0", - "wrap-guide": "0.36.0", + "wrap-guide": "0.37.0", "language-c": "0.48.0", "language-clojure": "0.17.0", "language-coffee-script": "0.42.0", From c1ef87ac8bf1a3d2e4dcb511880d9bc63022ba3e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 30 Sep 2015 10:35:19 +0200 Subject: [PATCH 10/10] :art: --- src/text-editor-element.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text-editor-element.coffee b/src/text-editor-element.coffee index ae30f2b2e..405cf30e4 100644 --- a/src/text-editor-element.coffee +++ b/src/text-editor-element.coffee @@ -280,7 +280,7 @@ class TextEditorElement extends HTMLElement @component?.getHorizontalScrollbarHeight() or 0 getVisibleRowRange: -> - @component?.getVisibleRowRange() or 0 + @component?.getVisibleRowRange() or [0, 0] intersectsVisibleRowRange: (startRow, endRow) -> [visibleStart, visibleEnd] = @getVisibleRowRange()