The configuration setting
Auto-save modified documents when application loses focus at
Advanced - Settings or Configuration - Editor - Advanced was introduced with UltraEdit for Windows v13.00 and UEStudio v6.20 released March 2007. So this setting did not exist as
dome created this topic August 2004 with using UltraEdit for Windows v10.20a.
This configuration setting works as designed and explained by help of UltraEdit v26.20.0.46. A modified file opened with usage of a temporary file is not saved on switching to another application for example with
Alt+TAB with this setting not checked and is saved with this setting checked in configuration.
The file saving behavior is different on not using a temporary file because of
- the file is very large and the user decided to open it without usage of a temporary file on being prompted by UltraEdit for faster opening and editing the large file or
- the chosen configuration at Advanced - Settings or Configuration - File handling - Temporary files resulted without or with a prompt to open the file without usage of a temporary file.
The help page opened on clicking the button
Help in
Temporary files configuration dialog contains the warning:
WARNING - If this option is selected, all changes are permanent!
Well, this warning is not 100% correct because of
all changes are not permanent. All modifications like inserting a text or removing a text done within the byte range of the file content currently loaded into the file buffer are just done on the bytes in file buffer. So these changes on data in file buffer are not written immediately to storage media and can be undone and redone even on not using a temporary file.
But UltraEdit/UEStudio flushes always the file buffer to storage media on input focus leaves the document window of the file opened without usage of a temporary file. So any modification on file opened without usage of a temporary file is saved on input focus is switched to another application or just another window inside UltraEdit like another file window or a view like
File View or
Output Window or a dialog window like the
Quick find or the
Find and Replace window. This can be seen easily by opening a file without usage of a temporary file, insert a space and delete it resulting in a red dot indication on file tab for not saved modifications on file and press next
Ctrl+R to open the
Find and Replace window with switching input focus to the
Find what edit field on tab
Replace. The file respectively file buffer is saved to storage media indicated immediately with a green dot on its file tab.
So I recommend to open
Advanced - Settings or Configuration - File handling - Temporary files and make sure to have either
Use temporary file for editing (normal operation) selected or one of the two other options with setting
Threshold for above being set for example to 20480 KB (more precisely KiB which is 20 MiB in this case). The usage of second or third option with default threshold value of 0 is definitely a very bad idea as this results in even small files with just some bytes are opened without usage of a temporary file and therefore saved on every loss of input focus on file window.
BTW: On having selected the first option
Use temporary file for editing (normal operation) (default) and
Threshold for above has the default value 0 KB, UltraEdit prompts the user how to open the file if its file size is 50 MiB or larger - without or with usage of a temporary file.
UltraEdit opens a file without usage of a temporary file if it fails to create a temporary file. The reasons can be:
- The directory Restore in directory of used INI file cannot be created or is write-protected or it is not possible to create one more file in this directory.
The INI file is by default stored for UltraEdit in %APPDATA%\IDMComp\UltraEdit and for UEStudio in %APPDATA%\IDMComp\UEStudio.
The directory Restore is the default directory for temporary files since UltraEdit for Windows v25.20 and UEStudio v18.20 introducing the Session options for saving state.
- The directory defined manually in INI file of UltraEdit/UEStudio for temporary files cannot be created or is write-protected or it is not possible to create one more file in this directory.
- The environment variable TEMP is not defined at all on starting UltraEdit < v25.20 or UEStudio < v18.20.
- The directory %TEMP% cannot be created or is write-protected or it is not possible to create one more file in this directory.
See also: