mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Don't clip range start/end in DisplayBuffer::pixelRectForScreenRange
Fixes #2583 This prevents the cursor from having 0 width inside atomic tokens.
This commit is contained in:
@@ -289,9 +289,9 @@ class DisplayBuffer extends Model
|
||||
height = (screenRange.end.row - screenRange.start.row + 1) * @getLineHeightInPixels()
|
||||
width = @getScrollWidth()
|
||||
else
|
||||
{top, left} = @pixelPositionForScreenPosition(screenRange.start)
|
||||
{top, left} = @pixelPositionForScreenPosition(screenRange.start, false)
|
||||
height = @getLineHeightInPixels()
|
||||
width = @pixelPositionForScreenPosition(screenRange.end).left - left
|
||||
width = @pixelPositionForScreenPosition(screenRange.end, false).left - left
|
||||
|
||||
{top, left, width, height}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user