mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
💄
This commit is contained in:
@@ -25,4 +25,4 @@ class AceAdaptor
|
||||
@buffer.change(range, text)
|
||||
|
||||
findMatchingBracket: ({row, column}) ->
|
||||
@tokenizedBuffer.findOpeningBracket([row, column])
|
||||
@tokenizedBuffer.findOpeningBracket([row, column])
|
||||
|
||||
@@ -42,14 +42,14 @@ class Cursor
|
||||
if @selection
|
||||
@selection.clear() unless @selection.retainSelection
|
||||
|
||||
getCurrentScreenRow: ->
|
||||
getScreenRow: ->
|
||||
@getScreenPosition().row
|
||||
|
||||
getCurrentBufferRow: ->
|
||||
getBufferRow: ->
|
||||
@getBufferPosition().row
|
||||
|
||||
getCurrentBufferLine: ->
|
||||
@editSession.lineForBufferRow(@getCurrentBufferRow())
|
||||
@editSession.lineForBufferRow(@getBufferRow())
|
||||
|
||||
refreshScreenPosition: ->
|
||||
@anchor.refreshScreenPosition()
|
||||
@@ -87,7 +87,7 @@ class Cursor
|
||||
@setBufferPosition(@editSession.getEofBufferPosition())
|
||||
|
||||
moveToBeginningOfLine: ->
|
||||
@setBufferPosition([@getCurrentBufferRow(), 0])
|
||||
@setBufferPosition([@getBufferRow(), 0])
|
||||
|
||||
moveToFirstCharacterOfLine: ->
|
||||
position = @getBufferPosition()
|
||||
@@ -100,7 +100,7 @@ class Cursor
|
||||
@setBufferPosition(newPosition)
|
||||
|
||||
moveToEndOfLine: ->
|
||||
@setBufferPosition([@getCurrentBufferRow(), Infinity])
|
||||
@setBufferPosition([@getBufferRow(), Infinity])
|
||||
|
||||
moveToBeginningOfWord: ->
|
||||
@setBufferPosition(@getBeginningOfCurrentWordBufferPosition())
|
||||
@@ -153,7 +153,7 @@ class Cursor
|
||||
new Range(@getBeginningOfCurrentWordBufferPosition(allowPrevious: false), @getEndOfCurrentWordBufferPosition(allowNext: false))
|
||||
|
||||
getCurrentLineBufferRange: ->
|
||||
@editSession.bufferRangeForBufferRow(@getCurrentBufferRow())
|
||||
@editSession.bufferRangeForBufferRow(@getBufferRow())
|
||||
|
||||
isAtBeginningOfLine: ->
|
||||
@getBufferPosition().column == 0
|
||||
|
||||
@@ -194,7 +194,7 @@ class EditSession
|
||||
@displayBuffer.destroyFoldsContainingBufferRow(bufferRow)
|
||||
|
||||
unfoldCurrentRow: ->
|
||||
@largestFoldStartingAtBufferRow(@getLastCursor().getCurrentBufferRow())?.destroy()
|
||||
@largestFoldStartingAtBufferRow(@getLastCursor().getBufferRow())?.destroy()
|
||||
|
||||
destroyFold: (foldId) ->
|
||||
fold = @displayBuffer.foldsById[foldId]
|
||||
|
||||
@@ -132,9 +132,9 @@ class Selection
|
||||
@autoOutdent() if shouldOutdent
|
||||
|
||||
backspace: ->
|
||||
if @isEmpty() and not @editSession.isFoldedAtScreenRow(@cursor.getCurrentScreenRow())
|
||||
if @cursor.isAtBeginningOfLine() and @editSession.isFoldedAtScreenRow(@cursor.getCurrentScreenRow() - 1)
|
||||
@selectToBufferPosition([@cursor.getCurrentBufferRow() - 1, Infinity])
|
||||
if @isEmpty() and not @editSession.isFoldedAtScreenRow(@cursor.getScreenRow())
|
||||
if @cursor.isAtBeginningOfLine() and @editSession.isFoldedAtScreenRow(@cursor.getScreenRow() - 1)
|
||||
@selectToBufferPosition([@cursor.getBufferRow() - 1, Infinity])
|
||||
else
|
||||
@selectLeft()
|
||||
|
||||
@@ -146,7 +146,7 @@ class Selection
|
||||
|
||||
delete: ->
|
||||
if @isEmpty()
|
||||
if @cursor.isAtEndOfLine() and fold = @editSession.largestFoldStartingAtScreenRow(@cursor.getCurrentScreenRow() + 1)
|
||||
if @cursor.isAtEndOfLine() and fold = @editSession.largestFoldStartingAtScreenRow(@cursor.getScreenRow() + 1)
|
||||
@selectToBufferPosition(fold.getBufferRange().end)
|
||||
else
|
||||
@selectRight()
|
||||
@@ -207,7 +207,7 @@ class Selection
|
||||
@editSession.autoIndentTextAfterBufferPosition(text, @cursor.getBufferPosition())
|
||||
|
||||
autoOutdent: ->
|
||||
@editSession.autoOutdentBufferRow(@cursor.getCurrentBufferRow())
|
||||
@editSession.autoOutdentBufferRow(@cursor.getBufferRow())
|
||||
|
||||
handleBufferChange: (e) ->
|
||||
@modifyScreenRange =>
|
||||
|
||||
@@ -33,4 +33,4 @@ class RegexAddress extends Address
|
||||
isRelative: -> true
|
||||
|
||||
reverse: ->
|
||||
new RegexAddress(@regex, !@isReversed)
|
||||
new RegexAddress(@regex, !@isReversed)
|
||||
|
||||
Reference in New Issue
Block a user