Skip to content

Changing mde.auto_fold_link.enabled from true to false while document open leaves UI broken #742

@0xdevalias

Description

@0xdevalias

Overview

There seems to be a bug when changing mde.auto_fold_link.enabled from true to false while a document is open.

To Reproduce

With a document open (tested on an unsaved file, unsure if it applies to both saved/unsaved) that will have it's links collapsed:

- [Foo](#foo)
- [Bar](#bar)
- [Baz](#baz)

With mde.auto_fold_link.enabled set to true, the links are collapsed as expected:

image

And reveal again when we click on the link section:

image

Leaving that file open, if we now set mde.auto_fold_link.enabled to false, the 'collapsed links' are still present:

image

And we can't even click on them to make them visible anymore:

image

Proposed Solution

I'm not sure of the exact mechanics of implementing a fix for this, but my expectation as a user would be that when I disable a setting like that, that any open documents would first have that setting 'unapplied' on them as part of disabling it. (It seems that changing it from false to true does update open documents; so it's even weirder to me as a user that it doesn't work in reverse)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions