Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to *not* close file marked as viewed via keybinding #5092

Open
ian-h-chamberlain opened this issue Jul 20, 2023 · 2 comments
Open

Option to *not* close file marked as viewed via keybinding #5092

ian-h-chamberlain opened this issue Jul 20, 2023 · 2 comments
Labels
feature-request Request for new features or functionality good first issue Good for newcomers

Comments

@ian-h-chamberlain
Copy link

ian-h-chamberlain commented Jul 20, 2023

When you mark a file as viewed through the active editor menu bar or through a keybinding, the file will close. When you mark it as viewed through the tree view then it will not close. If a setting is needed I'll add one, but my hope is that this behavior is better for almost everyone.

Originally posted by @alexr00 in #3513 (comment)

Per this comment, it seems the default behavior for keybindings (or editor menu bar) calling pr.markFileAsViewed is to close the file, but for my workflow I'd prefer it didn't. Is it possible to add either a config setting, new command, or allow "args" in the keybinding to disable closing the active editor when this command is executed?

If it would be accepted, I could also attempt a PR for whichever of those options seems preferable. Thanks!

Edit: as a workaround (at least for keybindings) I found this seems to work okay - although the visual effect of closing and immediately reopening the editor is a bit jarring:

    {
        "key": "alt+j",
        "command": "runCommands",
        "args": {
            "commands": [
                "pr.markFileAsViewed",
                "workbench.action.reopenClosedEditor",
            ]
        },
        "when": "editorTextFocus && github:inReviewMode && isInDiffEditor",
    }
@alexr00 alexr00 added feature-request Request for new features or functionality good first issue Good for newcomers labels Jul 21, 2023
@mogelbrod
Copy link

I would love this! Both a setting and/or an argument to the command would be super useful 👍

@alfredbirk
Copy link

Same. My workflow is to use the GitHub Pull Requests: Go to Next Diff in Pull Request repeatedly and at the end of a file I mark it as viewed. But since it closes, I'm not able to go to next the file after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants