sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
812 stars 40 forks source link

Incremental Diff not displaying diff markers after restart #4968

Open pyorokun7 opened 3 years ago

pyorokun7 commented 3 years ago

Description

I had to format my laptop, and when after installing ST4, the Side Bar correctly shows that I have modified files all the time, but the diff markers only work during the current session, after restarting they are gone, which I'm sure they were displayed before the format, until I reverted the changes/commit.

It doesn't matter the value of "git_diff_target". Both "index" and "head" show the same behavior. Attempted changing values for "mini_diff" and "git_diff_target", on restart the diff markers are gone.

I use a lot jump navigation to changes during development, and to review my changes before commit.

Steps to reproduce

  1. Change a file in a Git repository
  2. Check that the diff marker appears on the modified line
  3. Restart ST4
  4. Check for the presence of diff markers
  5. Attempting to use jump navigation for changes fails

Expected behavior

Both the diff markers should appear, and the jump navigation for changes work, if the respective setting is enabled, after closing/opening ST4

Actual behavior

The diff markers are gone after the restart. Jump navigation doesn't work after restart either.

Environment

Current Packages\User\Preferences.sublime-settings is { "draw_minimap_border": true, "always_show_minimap_viewport": true, "highlight_modified_tabs": true, "git_diff_target": "head" } Side Bar image Before restart image After restart, without saving image

BenjaminSchaaf commented 3 years ago

Does it happen in safe mode?

pyorokun7 commented 3 years ago

In safe mode, it works as expected.

I ran a comparison between the folders at %APPDATA%\Roaming, and this is the result image

Experimenting, I removed my preferences file, leaving it like this. image

But still doesn't work outside of safe mode.

pyorokun7 commented 3 years ago

Ok, I replaced the Session.sublime_session file from safe-mode into the 'normal' mode folder, and now works as expected.

I saved the older, and apparently faulty one, just in case is needed.

BenjaminSchaaf commented 3 years ago

If possible could you share the older session? You can email me if privacy is a concern.

pyorokun7 commented 3 years ago

Email sent. If it gets blocked, I will attach it here.

BenjaminSchaaf commented 3 years ago

Thanks. Unfortunately I wasn't able to find anything in the session that could cause that. Does it start happening again if you put the session file back?

pyorokun7 commented 3 years ago

Yes, if I put the original file back, it happens again.

Just to test something, I closed all the files in the problematic session, restarted ST, and opened a modified file. It worked as expected.

I restored again the problematic session file, closed just one of the modified files and opened again and it worked too.

So, I don't know what causes it, but at least know how to kinda fix it, for now.

Thanks for your time looking into this. If I run into this again, I will try to figure out how.

David

On Tue, Oct 26, 2021, 11:40 PM Benjamin Schaaf @.***> wrote:

Thanks. Unfortunately I wasn't able to find anything in the session that could cause that. Does it start happening again if you put the session file back?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sublimehq/sublime_text/issues/4968#issuecomment-952532892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5SDCUO7HP2E67RDONZCBDUI57FNANCNFSM5GYMJOGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

deathaxe commented 3 years ago

I need to investigate the circumstances but I am pretty sure I suffered the same issues for git tracked files. Minidiff not being restored correctly is one major reason for me to still use GitGutter.