Bugs item #2222159, was opened at 2008-11-04 21:04
Message generated for change (Comment added) made by lebert
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=2222159&group_id=11005

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: File was not reload when type was changed externaly

Initial Comment:
You open a file in DOS format with nedit, then you modified the type format 
from DOS to UNIX with an external program, then when you refocus on nedit it 
haven't change from DOS to UNIX so if you modified and save in nedit the UNIX 
format of the file was lost.




----------------------------------------------------------------------

Comment By: Bert Wesarg (lebert)
Date: 2008-11-05 08:33

Message:
confirmed. here is a proposed fix:

--- a/source/file.c
+++ b/source/file.c
@@ -2061,6 +2061,13 @@ static int cmpWinAgainstFile(WindowInfo 
         
         nRead += offset;
 
+        /* check for on-disk file format changes, but only for the first
hunk */
+        if (bufPos == 0 && fileFormat != FormatOfFile(fileString)) {
+            fclose(fp);
+            AllWindowsUnbusy();
+            return (1);
+        }
+
         if (fileFormat == MAC_FILE_FORMAT)
             ConvertFromMacFileString(fileString, nRead);
         else if (fileFormat == DOS_FILE_FORMAT)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=2222159&group_id=11005
-- 
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to