Skip to content

Git commit messages restore previous cursor position #2761

Description

@skostojohn

When using Fresh as Git's editor as documented:

git config --global core.editor 'fresh --cmd daemon open-file . --wait'

each invocation of git commit opens .git/COMMIT_EDITMSG with the cursor restored to the previous editing location instead of the beginning of the file.

Since COMMIT_EDITMSG is recreated for every commit, restoring the previous cursor position is not useful and requires manually moving the cursor before typing the commit message.

Expected behavior

Either:

do not restore cursor position for Git commit message files, or
provide a configuration option to exclude files or glob patterns from cursor position persistence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions