macvim-dev / macvim-dev/macvim

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

Đang mở
#1,579 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Vim Script
Star
7.9k
Fork
691
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu từ phần xử lý macaction terminate: và so sánh với đường dẫn thoát Vim thông thường, sử dụng các đường dẫn Cmd-Q và đăng xuất/khởi động lại đã được báo cáo làm các trường hợp tái hiện. Tái hiện bằng mvim --clean, set confirm và các buffer chưa lưu; hoàn tất khi mỗi buffer được xác nhận và VimLeavePre chạy trong quá trình kết thúc.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
macos, vim
Lĩnh vực
desktop
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.