nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit f4595bb5aea58441242bbcaba2c042ceb150c1ca
parent c4dbdd55f514af41f20c0a4961b56170ce822010
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Mon,  6 Jun 2005 16:27:18 +0000

in die(), if the current filestruct's been partitioned, unpartition it
before saving the associated file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 2++
Msrc/nano.c | 7++++++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -105,6 +105,8 @@ CVS code - - Rename variable ret to retval for consistency. (DLR) - Tweak the message displayed when a backup file can't be written, so as to not duplicate a translated string. (DLR) + - If the current filestruct's been partitioned, unpartition it + before saving the associated file. (DLR) copy_filestruct() - Rename variable prev to copy to avoid confusion. (DLR) print1opt_full() diff --git a/src/nano.c b/src/nano.c @@ -126,8 +126,13 @@ void die(const char *msg, ...) va_end(ap); /* Save the current file buffer if it's been modified. */ - if (ISSET(MODIFIED)) + if (ISSET(MODIFIED)) { + /* If we've partitioned the filestruct, unpartition it now. */ + if (filepart != NULL) + unpartition_filestruct(&filepart); + die_save_file(filename); + } #ifdef ENABLE_MULTIBUFFER /* Save all of the other modified file buffers, if any. */