Sami Jaktholm 210b181f29 Bug 1148086 - Style Editor: Don't jump to the first line unconditionally when an editor is shown. r=bgrins
This overrides the jump-to-line other tools might have requested if the editor
was not already active. The idea was to restore the scroll position after the
editor was hidden and then shown again but the functionality regressed when bug
816967 was fixed.

Now that Style Editor uses CodeMirror the scroll position can be restored by
calling refresh on the CodeMirror instance. If a specific line to focus was
specified, refreshing the editor is a no-op as it was done when the line was
selected. However, if the editor was not refreshed after the editor became
visible again (i.e. a line to jump to was not specified), refreshing it will
restore the previous scroll position.
2015-04-25 06:54:25 +03:00
..