mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Enable soft wraps and folds in large file mode
This commit is contained in:
@@ -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.
|
||||
#
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user