mirror of
https://github.com/atom/atom.git
synced 2026-02-09 06:05:11 -05:00
"Scroll" gutter by relatively positioning its line numbers
This matches how we scroll lines, and eliminates opportunities for the gutter to get out of sync with the lines. If that happened, it would probably be a bug, but this at least eliminates one source of confusion when debugging.
This commit is contained in:
@@ -413,7 +413,7 @@ class Editor extends View
|
||||
@updateRenderedLines() if @attached
|
||||
|
||||
@renderedLines.css('top', -scrollTop)
|
||||
@gutter.scrollTop(scrollTop)
|
||||
@gutter.lineNumbers.css('top', -scrollTop)
|
||||
if options?.adjustVerticalScrollbar ? true
|
||||
@verticalScrollbar.scrollTop(scrollTop)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports =
|
||||
class Gutter extends View
|
||||
@content: ->
|
||||
@div class: 'gutter', =>
|
||||
@div outlet: 'lineNumbers', class: 'wtf'
|
||||
@div outlet: 'lineNumbers', class: 'line-numbers'
|
||||
|
||||
editor: ->
|
||||
editor = @parentView
|
||||
|
||||
Reference in New Issue
Block a user