`macaction terminate:` (also quit via Cmd-q/logout/reboot) ignores `set confirm`

未关闭
#1,579 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
macos, vim
领域
desktop

调研方向

macaction terminate: 的处理开始,将其与正常的 Vim 退出路径进行比较,并使用报告中的 Cmd-Q 和注销/重启路径作为复现用例。使用 mvim --cleanset confirm 和未保存的缓冲区进行复现;当每个缓冲区都得到确认且 VimLeavePre 在终止期间运行时,即完成。

由索引模型根据 Issue 内容生成。

描述

Steps to reproduce
  1. Run set confirm
  2. Create a few buffers with unsaved changes (doesn't matter if the buffers are backed by files or not).
  3. Run command macaction terminate:, or press Cmd-Q, or reboot machine.
Expected behaviour

The setting set confirm should prompt for each unsaved buffer whether you are okay with discarding changes. However, macaction terminate: completely ignores this setting, and just shows a dialog that doesn't mention any file names:

Quit without saving?

There are modified buffers, if you quit now all changes will be lost. Quit anyway?

It appears that macaction terminate: skips a lot of normal Vim exit code as well - autocommands like VimLeavePre do not run.

Version of MacVim

r181

MacVim installation method

GitHub release

Environment

macOS 15.4.1 Sequoia

Logs and stack traces
N/A
Vim and MacVim configuration where issue is reproducable

Doesn't appear to depend on config. I tested both with mvim --clean and my usual config, https://github.com/telotortium/vimrc

How was MacVim launched?
  • by launching MacVim.app in macOS (by using the Dock, Spotlight, or the open command)
  • by running mvim/gvim in the terminal
Issue has been tested with clean configuration
  • by running mvim --clean (or gvim, supplied by MacVim distribution). You can also use the File → "New Clean Window" menu item within MacVim.
  • by running vim --clean (in terminal, supplied by MacVim distribution)
  • by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)
主要语言
Vim Script
星标
7.9k
派生
691
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

macvim-dev/macvim 的其他 Issue

查看 macvim-dev/macvim 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。