mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-17 21:03:19 +08:00
Fix: Allow saving unmodified files when strip blanks is enabled (fixes #5444)
Added Settings.FixTrailingBlanks check to FileSave() early return condition, allowing save to proceed when strip trailing blanks is enabled even if document appears unmodified.
This commit is contained in:
parent
e8108429e3
commit
746c4772b9
@ -12046,7 +12046,7 @@ bool FileSave(FileSaveFlags fSaveFlags)
|
||||
|
||||
bool const bSaveNeeded = (IsSaveNeeded() || IsFileChangedFlagSet()) && !bIsEmptyNewFile;
|
||||
|
||||
if (!(fSaveFlags & FSF_SaveAs) && !(fSaveFlags & FSF_SaveAlways) && !bSaveNeeded) {
|
||||
if (!(fSaveFlags & FSF_SaveAs) && !(fSaveFlags & FSF_SaveAlways) && !bSaveNeeded && !Settings.FixTrailingBlanks) {
|
||||
_MRU_UpdateSession();
|
||||
AutoSaveStop();
|
||||
ResetFileObservationData(true);
|
||||
|
||||
@ -102,10 +102,9 @@
|
||||
- Issue: [#1129](https://github.com/rizonesoft/Notepad3/issues/1129)
|
||||
- [ ] **(Q2) Improve Temp File Handling** - Better UX for files from archives
|
||||
- Issue: [#5343](https://github.com/rizonesoft/Notepad3/issues/5343)
|
||||
- [ ] **(Q1) Force Save Option** - Allow saving unmodified files for strip trailing blanks
|
||||
- [x] **(Q1) Force Save Option** - ✅ FIXED
|
||||
- Issue: [#5444](https://github.com/rizonesoft/Notepad3/issues/5444)
|
||||
- Code: `Notepad3.c:12042` - `bSaveNeeded` check skips save on unmodified files
|
||||
- Fix: Check strip-blanks setting before early return at line 12044
|
||||
- Fix: Added `Settings.FixTrailingBlanks` check to early return in `FileSave()`
|
||||
|
||||
## GitHub Actions
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user