diff --git a/src/Notepad3.c b/src/Notepad3.c index 04cc2d135..21f851ffb 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -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); diff --git a/todo/TODO.md b/todo/TODO.md index 80d447bc9..8738b2e6e 100644 --- a/todo/TODO.md +++ b/todo/TODO.md @@ -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