Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rather than always setting the start point of the bottom line to the
second to last row, only do so if the selection on the last row is
empty.

Before, the last two rows would be underlined if anything on the last
row was selected, because the bottom line would start on the second to
last row and ended on the last row.
  • Loading branch information
DoughnutSlayer committed Nov 5, 2017
1 parent 3f0c985 commit 1bbbdcf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/highlight-line-model.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ class HighlightLineView
bottomLine = selectionRange.copy()

topLine.end = topLine.start
bottomLine.start = new Point(bottomLine.end.row - 1,
bottomLine.end.column)
if bottomLine.end.column == 0
bottomLine.start = new Point(bottomLine.end.row - 1,
bottomLine.end.column)
else
bottomLine.start = bottomLine.end

style = atom.config.get "highlight-line.underline"

Expand Down

0 comments on commit 1bbbdcf

Please sign in to comment.