Option to *not* close file marked as viewed via keybinding · Issue #5092 · microsoft/vscode-pull-request-github · GitHub
Skip to content

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

Open

Description

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 Alex Ross (@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",
    }

Activity

  1. mogelbrod commented on Sep 6, 2023

    @mogelbrod

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

  2. alfredbirk commented on Nov 3, 2023

    @alfredbirk

    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.

  3. andrew-lis commented on Jun 13, 2025

    @andrew-lis

    Somebody should take away mouses from the authors of this plugin. Only then they would quickly make it keyboard-shortcut friendly.

  4. laharigandrapu11 commented on Jul 17, 2025

    @laharigandrapu11

    Hi Alex Ross (@alexr00), I’d like to work on this if it's available

  5. laharigandrapu11 commented on Jul 17, 2025

    @laharigandrapu11

    Hi, please review the attached PR and feel free to suggest any changes.
    Thanks!
    #7319

  6. sarah-r-woodrow commented on Jul 8, 2026

    @sarah-r-woodrow

    I want use the workflow described above, but it does not work without this option. Lahari Gandrapu (@laharigandrapu11) please consider reviving this!

  7. jjspace commented on Jul 16, 2026

    @jjspace

    I generally don't like bumping issues but I'm once again finding myself trying to review a very large PR with only small 1-2 line changes across many many files. This process is super tedious using the mouse on GH. It would be amazing if I could just use 1 or 2 shortcuts to quickly move through all the files marking them viewed as I pass and check each...

    Alex Ross (@alexr00) any chance we can get some movement on this or #4424? or maybe re-opening #5537 with a setting to move to the next file automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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