Sublime Forum

Tiny File Changed Twice During Save

#1

I have a directory containing a file test.jl with the following contents:

function __main__()
    println("revise is... magic.")
end

__main__()

If I save the file, Sublime seems to take several seconds to write it — after about a second I see “99%” appended to the bottom status bar:

If I run a small program to watch files in the directory and report changes, there is a change reported immediately after the save, and the another one after the “99%” appears and disappears a few seconds later.

Opening the same file and modifying and saving it with Vim, the same program sees it changed only once.

I searched but did not find this to be already-reported. The package list I have installed in Sublime is minimal (this is the entire list):

I also tested this in other directories and other file extensions (.txt) and the issue replicates reliably across restarts of Sublime.

Edit: Trying to track this further… I wonder if this might have to do with the file being in Dropbox.

Edit2: Nope, if dropbox is paused the extended saving 99% indicator still appears.

0 Likes

#2

maybe you have atomic save set to true?
does closing the project in ST make any difference? I imagine the indexing percentage will stop appearing when you save the file without a project/folder open in the sidebar, but presumably won’t fix the double modification issue. If you use the File menu -> Save, does that make a difference?

1 Like

#4

Yeah, I don’t see the “99%” indicator if I save a file outside a project.

And it looks for the moment like the double-change is unrelated to Sublime; I can reproduce it even with TextEdit.

So the only “problem” here is the “99%” indicator, which you say is an indexing percentage. At worst that would mean Sublime is somehow doing more work than is necessary even though this single file is changed, but that’s probably not a bug even if it is true.

If I do File > Save, it does not make a difference.

0 Likes