Conversation
da-liii
commented
Sep 24, 2026
| return false; | ||
| // tmfs 虚拟协议缓冲区属于内部虚拟视图或辅助缓冲区,无需保存。 | ||
| // 阻止底层编辑器置脏,消除关闭/退出时的保存提示。 | ||
| if (!is_nil (buf) && is_no_save_buffer (buf->buf->name)) return false; |
Contributor
Author
There was a problem hiding this comment.
这里之前加了 collab 的特判,这里删除是有问题的
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务简述
彻底消除关闭软件或关闭窗口时对 tmfs 虚拟缓冲区的保存提示:
new_view.hpp/new_view.cpp中新增is_no_save_buffer(url)谓词;tm_buffer_rep::needs_to_be_saved()、needs_to_be_autosaved()以及edit_modify_rep::need_save()中对 tmfs 缓冲区恒返回 false,阻止编辑器置脏;buffer_modified(url)和buffer_modified_since_autosave(url)中对 tmfs 缓冲区直接返回 false;tm-server.scm中定义(buffer-no-save? buf),涵盖所有(url-rooted-tmfs? buf)与(buffer-aux? buf);safely-quit-TeXmacs中使用(filter (non buffer-no-save?) m)过滤待保存列表,确保内部虚拟缓冲区不进入退出流程;safely-kill-window、safely-kill-tabpage、safely-kill-tabpage-by-url、safely-kill-buffer中加入buffer-no-save?检查并直接关闭;confirm-close-dialog中移除(url-rooted-tmfs? buffer)作为草稿的逻辑,并在入口处若遇到buffer-no-save?直接调用(on-dont-save);tests/Data/tmfs_no_save_test.cpp(xmake b tmfs_no_save_test && xmake r tmfs_no_save_test);TeXmacs/tests/6008.scm(xmake r 6008)。