mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
Don't highlight line if selection is multiline
This commit is contained in:
@@ -943,4 +943,5 @@ class Editor extends View
|
||||
@cursorScreenRow = @getCursorScreenPosition().row
|
||||
screenRow = @cursorScreenRow - @firstRenderedScreenRow
|
||||
@find('.line.cursor-line').removeClass('cursor-line')
|
||||
@find(".line:eq(#{screenRow})").addClass('cursor-line')
|
||||
if !@getSelection().isMultiLine()
|
||||
@find(".line:eq(#{screenRow})").addClass('cursor-line')
|
||||
|
||||
@@ -31,6 +31,10 @@ class Selection
|
||||
isReversed: ->
|
||||
not @isEmpty() and @cursor.getBufferPosition().isLessThan(@anchor.getBufferPosition())
|
||||
|
||||
isMultiLine: ->
|
||||
range = @getScreenRange()
|
||||
range.start.row != range.end.row
|
||||
|
||||
getScreenRange: ->
|
||||
if @anchor
|
||||
new Range(@anchor.getScreenPosition(), @cursor.getScreenPosition())
|
||||
|
||||
Reference in New Issue
Block a user