Enable soft wraps and folds in large file mode

This commit is contained in:
Max Brunsfeld
2016-12-06 17:34:00 -08:00
parent 20088cff75
commit 3cb64a97bd
2 changed files with 3 additions and 13 deletions

View File

@@ -991,10 +991,7 @@ class TextEditor extends Model
@bufferRowForScreenRow(screenRow)
screenRowForBufferRow: (row) ->
if @largeFileMode
row
else
@displayLayer.translateBufferPosition(Point(row, 0)).row
@displayLayer.translateBufferPosition(Point(row, 0)).row
getRightmostScreenPosition: -> @displayLayer.getRightmostScreenPosition()
@@ -2925,11 +2922,7 @@ class TextEditor extends Model
# Essential: Determine whether lines in this editor are soft-wrapped.
#
# Returns a {Boolean}.
isSoftWrapped: ->
if @largeFileMode
false
else
@softWrapped
isSoftWrapped: -> @softWrapped
# Essential: Enable or disable soft wrapping for this editor.
#

View File

@@ -198,10 +198,7 @@ class TokenizedBuffer extends Model
@invalidateRow(end + delta + 1)
isFoldableAtRow: (row) ->
if @largeFileMode
false
else
@isFoldableCodeAtRow(row) or @isFoldableCommentAtRow(row)
@isFoldableCodeAtRow(row) or @isFoldableCommentAtRow(row)
# Returns a {Boolean} indicating whether the given buffer row starts
# a a foldable row range due to the code's indentation patterns.