Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Scroll state not remembered in some cases #12726

Closed
marcelgerber opened this issue Aug 27, 2016 · 4 comments
Closed

Scroll state not remembered in some cases #12726

marcelgerber opened this issue Aug 27, 2016 · 4 comments

Comments

@marcelgerber
Copy link
Contributor

marcelgerber commented Aug 27, 2016

Right now it looks like this is more of an extension problem, but I'm filing it here anyways because it might also be a recent regression.

  1. Install the brackets-git extension
  2. Open file 1 and scroll down a little
  3. Open file 2
  4. Open file 1
    You might have to try twice (that is, after step 4, go back to step 2)

Result:
The document is scrolled all the way to the top.

git bisect points to 5727863 cc @petetnt @thehogfather

As I said above, this is only an issue with some extensions, which is brackets-git (cc @zaggino) for me and at least one other that I can't quite make out (list of installed examples below). So as it causes regressions in multiple extensions, it could break one core functionality for end users as well.

Show installed extensions

    "installedExtensions": [
        {
            "name": "alexpersian.spacegray-brackets",
            "version": "1.1.0"
        },
        {
            "name": "brackets-integrated-development",
            "version": "0.5.59"
        },
        {
            "name": "brackets-mystique-theme",
            "version": "0.1.9"
        },
        {
            "name": "kmelkon.seti-syntax",
            "version": "0.0.1"
        },
        {
            "name": "lion",
            "version": "1.0.0"
        },
        {
            "name": "moonlitglacier",
            "version": "1.0.1"
        },
        {
            "name": "rain.monokai-dark-soda",
            "version": "1.0.9"
        },
        {
            "name": "tadorhead.crystal-blue.dark",
            "version": "1.0.2"
        },
        {
            "name": "theseus",
            "version": "0.4.19"
        },
        {
            "name": "visual-studio-dark",
            "version": "1.1.4"
        },
        {
            "name": "lesshints",
            "version": "1.1.0"
        },
        {
            "name": "pflynn.reasonable-comments",
            "version": "1.3.0"
        },
        {
            "name": "scroll-arrows",
            "version": "0.1.1"
        },
        {
            "name": "brackets-npm-registry",
            "version": "0.6.3"
        },
        {
            "name": "brackets-indent-guides",
            "version": "1.3.5"
        },
        {
            "name": "pflynn.svg.preview",
            "version": "1.3.0"
        },
        {
            "name": "camden.caniuse",
            "version": "2.1.2"
        },
        {
            "name": "gruehle.markdown-preview",
            "version": "1.0.11"
        },
        {
            "name": "camden.jshint",
            "version": "2.2.19"
        },
        {
            "name": "de.richter.brackets.jsonlint",
            "version": "0.1.3"
        },
        {
            "name": "quickdocsjs",
            "version": "1.6.9"
        },
        {
            "name": "quickdocsregex",
            "version": "0.2.0"
        },
        {
            "name": "quickdocsphp",
            "version": "1.4.7"
        },
        {
            "name": "brackets-typescript",
            "version": "0.8.0"
        },
        {
            "name": "mikaeljorhult.brackets-autoprefixer",
            "version": "0.6.4"
        },
        {
            "name": "brackets-display-shortcuts",
            "version": "1.3.5"
        },
        {
            "name": "zaggino.brackets-git",
            "version": "0.16.6"
        }
    ]
@marcelgerber
Copy link
Contributor Author

Turns out that the other extension that failed is brackets-eslint.
Still, I'd like to figure out what's the background as this surely wasn't intended to be a kind-of-breaking change.

@thehogfather
Copy link
Contributor

Off the top of my head, there might be a similar effect for any extensions that mutate the gutters. This is true of both extensions you've mentioned.
The background of commit @5727863 is that it watches changes to the gutter and makes sure the fold gutter is inserted after the line numbers (if line-numbers gutter is present). See here for details. I'm not sure how these changes affect state.json - it might be more apparent to someone more familiar with brackets core.

Might be a good time to think of a nice API within brackets to manipulate the gutters.

@zaggino
Copy link
Contributor

zaggino commented Aug 29, 2016

This is now fixed by #12727 but let's keep it open until we settle things around gutters api and get to final testing of 1.8

@ficristo
Copy link
Collaborator

#12742 was merged. Closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants