Repository navigation
Fix: Resolve false unsaved prompt when closing unmodified files - #4075
stevenchenUCD wants to merge 5 commits into
Conversation
This commit fixes issue #1 where the editor would incorrectly prompt to save files upon closing, even when no local modifications were made. Problem: - When a file was externally modified on disk, the code unconditionally set isSaved = false, causing the "unsaved changes" prompt even for unmodified files Solution: - Distinguish between "file already saved" and "file has local changes" states - If file is saved: silently load external changes with info notification - If file has unsaved changes: prompt user whether to reload Also added: - USAGE_GUIDE_CN.md: Chinese usage guide documenting that multi-window and PDF export features already exist in the application Changes: - src/renderer/store/editor.js (lines 1169-1195): Fixed file change handling logic - USAGE_GUIDE_CN.md: New documentation file
Added MAC_BUILD_GUIDE_CN.md with detailed instructions for building and packaging MarkText on macOS, including: - Prerequisites and system requirements - Step-by-step build instructions - Development mode setup - Troubleshooting common issues - Advanced build options - Output file descriptions This guide helps users build DMG and ZIP packages for both Intel (x64) and Apple Silicon (arm64) architectures.
Added INSTALL_FROM_REPO_CN.md with multiple installation methods: - Automatic build via GitHub Actions (release-v* branches) - Homebrew Cask installation - Direct download from GitHub Releases - One-click install scripts - CI/CD automation setup This guide helps users install MarkText without manual building by leveraging the existing GitHub Actions workflows.
Modified release.yml to trigger automatic builds for branches starting with 'claude/', in addition to 'release-v*' branches. This allows the release workflow to run on feature branches for testing and distribution.
Added comprehensive documentation: - HOMEBREW_INSTALL_CN.md: Complete guide for installing via Homebrew, including methods to override official cask and create custom tap - DOWNLOAD_CN.md: Full download page with all platform download links, installation instructions, and file checksums - README_FIXES.md: Summary of fixes and quick start guide These docs help users easily install the fixed version via multiple methods.
|
bug fix by claude |
|
There might be an extra factor here triggering the modified flag. When a file created elsewhere is opened, MarkText will auto-insert blank lines in a document below headers and at certain locations, silently modifying the file. Thus the "modified flag" is accurate, despite the user not making and not wanting any changes, the file has been changed. #3772 |
…ll position / XSS / contextIsolation - fix: 编辑菜单截图分割线仅 macOS 可见(Windows 不再出现双分割线) - fix(marktext#4093): 深色主题打开窗口预设背景色,消除白闪 - feat(marktext#4134): capitalizeAccelerator - 自定义快捷键修饰符大写修复 - fix(marktext#4146): 搜索打开文件后首次 muya 序列化不触发未保存状态 - fix(marktext#4075): 外部文件变更:已保存时静默加载,未保存时才提示 - fix(marktext#4152): 切换 Tab 保留滚动位置;打开文件光标定位到开头 - fix(marktext#4206): 图片属性 HTML 转义防 XSS/RCE - fix(marktext#4192): contextIsolation=true 防渲染进程调用 Node.js API
|
This project recently merged a large refactor (electron-vite migration, PR #4001) that upgraded dependencies and fixed several issues. Please review this PR and let us know if it is still needed, or if the changes have already been addressed upstream.
|
|
Thank you for the contribution. After review, we're closing this PR for two reasons:
Closing in favor of #4146. If you'd like to contribute the unsaved-prompt fix or any of the other changes, please open separate, focused PRs against the latest |

This commit fixes issue #1 where the editor would incorrectly prompt to save files upon closing, even when no local modifications were made.
Problem:
Solution:
Also added:
Changes:
Description
[Description of the bug or feature]