Skip to content

settings.json is needlessly written every time micro is started #2647

@dmaluka

Description

@dmaluka

settings.json file is needlessly written (its modification time changes) every time micro is started, i.e. even if the contents of settings.json don't change.

In particular, if there is a plugin installed that registers its own options e.g. with RegisterCommonOption (e.g. quoter or filemanager plugin), then when we open settings.json with micro, it shows The file on disk has changed. Reload file? (y,n,esc) dialog every time.

Also a similar issue (maybe less critical): TryBindKey() called with overwrite=true needlessly rewrites bindings.json even if its contents don't change. So for example if there is TryBindKey() called with overwrite=true in init.lua, it needlessly writes to the disk every time micro is started.

Specifications

Commit hash: fba5e2b
OS: any
Terminal: any

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions