Skip to content

fix vim close-all command - #8389

Merged
gtritchie merged 1 commit into
masterfrom
bugfix/vim-close-all
Nov 16, 2020
Merged

gtritchie merged 1 commit into
masterfrom
bugfix/vim-close-all

Conversation

@gtritchie

@gtritchie gtritchie commented Nov 15, 2020 •

Copy link
Copy Markdown
Member

Intent

Approach

  • Refactoring during addition of source columns removed handling of the "interactive" flag (and accidentally interpreted it as the "don't close active file" flag
  • Now "interactive" once again means a :qa or :qall vim command will prompt about unsaved changes, and ultimately close all files
  • The original code that got removed can be seen here:
    private void closeAllTabs(boolean interactive)
    {
    if (interactive)
    {
    // call into the interactive tab closer
    onCloseAllSourceDocs();
    }
    else
    {
    // revert unsaved targets and close tabs
    revertUnsavedTargets(new Command()
    {
    @Override
    public void execute()
    {
    // documents have been reverted; we can close
    cpsExecuteForEachEditor(editors_,
    new CPSEditingTargetCommand()
    {
    @Override
    public void execute(EditingTarget editingTarget,
    Command continuation)
    {
    view_.closeTab(editingTarget.asWidget(),
    false,
    continuation);
    }
    });
    }
    });
    }
    }

QA Notes

Validate scenario described in issue.

- Fixes #8388
- Refactoring during addition of source columns removed handling of the "interactive" flag (and accidentally interpreted it as the "don't close active file" flag
- Now "interactive" once again means a :qa command will prompt about unsaved changes, and ultimately close all files, and :qa! will close all files without saving
@gtritchie gtritchie added this to the v1.4 milestone Nov 15, 2020

@melissa-barca melissa-barca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for fixing this!

@gtritchie gtritchie closed this Nov 16, 2020
@gtritchie

Copy link
Copy Markdown
Member Author

Oops didn't mean to close it.

@gtritchie gtritchie reopened this Nov 16, 2020
@gtritchie
gtritchie merged commit 4e78ec3 into master Nov 16, 2020
@gtritchie
gtritchie deleted the bugfix/vim-close-all branch April 6, 2021 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vim quit-all command (qa, qall) not working

2 participants