sublime_text
sublime_text copied to clipboard
Ask infinite times to reload when a file changed too frequently
Description of the bug
I have a shell script which run a loop on 20000 files to load a database. Loading each file requires 1 second. At every loaded files, 5 lines are added to. log files so, 100.000 lines are expected. If I have the file loaded on Sublime and don't scroll the file for sometime, Sublime start to ask 'File is changed. Do you want to reload' and if I respond Reload it ask again and again. It is like the first request to reload is for the first identified change, the a second then a third and so on.
There should be an option to reload the file in its latest version, discharging all the intermediate steps.
Steps to reproduce
1: open file.log on Sublime 2. create a shell script that add 5 lines to file.log every second 3: goto sublime and look at the first change scrolling down at the latest line 4: wait 10 minutes 5: go back to sublime and try to scroll to the bottom
Expected behavior
Sublime should only ask to reload the file at its latest version (that maybe will change in the while)
Actual behavior
Sublime seems to remember a lot of changes to the file and ask you to reload every 'version'
Sublime Text build number
4126
Operating system & version
MACOS 12.4
(Linux) Desktop environment and/or window manager
No response
Additional information
MACBook PRO with M1 processor
OpenGL context information
No response
The dialog normally appears only, if an open file has unsaved changes, which would get lost in case of reloading content from disk.
Yes, but if I accept to reload, the dialog reappears a lot of times, once for any given change on the stored file. So, the only way to effectively reload the file is to close it and then reload, but the script in background continues to produce more changes, so the play restarts again and again ....
My point was it shouldn't ask at all in case log file hasn't been modified via ST before external scripts do so.
I agree! So could we consider this as a bug?
If "reload" button is hit once, all following filesystem updates shouldn't trigger confirmation update again until content is edited by user.
Maybe a race condition with hitting reload button vs. queued filesystem updates while dialog is open.
Im seeing this aswell on windows 10. it only seems to trigger when ST comes into focus and if there were atleast 2 modifications to the file since ST was last in focus. "always_prompt_for_file_reload" is false so i wouldnt expect the dialog to trigger at all.