New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sublime 3143 git gutter inconsistencies on scroll #452
Comments
GitGutter doesn't update the icons by pure scrolling - only after loading/saving a file, activating a view or content modification. Therefore
The icons and the markers in the minimap are created by the same API function If another package temporarily adds icons to a line which has been occupied by GitGutter, GitGutter's icons are dropped, which would look like missing icons then. There are several packages out there which add icons to the gutter asynchronously. Maybe one of them is fighting with GitGutter's icons. I don't have an idea whether and how this could be related to quick scrolling. Could you try to setup a clean installation of ST with PC, GitGutter and its dependencies added only to check whether the issue remains? |
ok, closed ST, moved not knowing anything about how ST draws the gutter icons, but is there maybe some race condition / timeout? |
Hmm, strange. In that case there are two last chances to find out whether the issue is caused by GitGutter. In order to fix issue #446 GitGutter 1.7.5 uses real threads to evaluate and add the icons. ST API is considered thread safe but maybe its buggy somehow. To check that, you could try to temporarily revert to GitGutter 1.7.4, which uses
If the issue still remains then, you could try to use the console to add a bunch of icons and check whether they remain in the gutter after scrolling. Will create a little helper for that. EDIT:
import sublime
import sublime_plugin
class DebugAddRegionsCommand(sublime_plugin.TextCommand):
def run(self, edit):
sublime.set_timeout_async(self.run_async, 0)
def run_async(self):
region = sublime.Region(0, self.view.size())
regions = [sublime.Region(r.a, r.a + 1) for r in self.view.lines(region)]
self.view.add_regions(
'debug_region',
regions=regions,
scope='markup.changed',
icon='Packages/Theme - Default/common/dot.png',
flags=sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE)
class DebugClearRegionsCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.erase_regions('debug_region')
|
if i do that ST completely freezes shortly after i try scrolling in the file after force-quit, it works, but GitGutter seems to be disabled... (i don't see any gutter icons, in console there's no loading message for the plugin and all options in Preferences / Package Settings / GitGutter are greyed out) I also noticed that the dependencies in |
ok, did some more testing by re-installing git gutter via PC, then unzipping the above link into Is this maybe a ST bug? maybe https://forum.sublimetext.com/t/bug-disappear-icons-in-the-gutter-and-the-tabs-row/5957 ? quite old though |
Sorry, didn't notice the zipfile to contain a single directory with the content being downloaded. With the issue remaining after reverting to GitGutter 1.7.4 I am quite sure it's a bug in ST. The gutter icon rendering was updated recently to correctly support the 4k screens and fix an issue with heavy CPU usage caused by many regions added. If we file an issue in the core section, the question will arise to create some procedure to reproduce the issue without any packages being installed. To really proof this issue is caused by the core, I would like to ask you one last thing to do. Please move away the data directory again. Then paste the content of the code snippets from my last post to a python file within the new User directory, open a (large?) file which is not located within a git repository (to keep GitGutter disabled) and run the mentioned command from console. Just paste |
yepp, same problem... completely vanilla ST dir, opened the no clue how to take this upstream to ST though :-/ |
problem actually also already exists with 50 lines if you make the window small and scoll fast enough... the more lines the easier though... |
I can't reproduce this issue. Gutter icons are rock stable on Windows. Seems to be an OS related issue. I've created an issue sublimehq/sublime_text#1947. Could you please provide information to complete the environment section? |
👍 thanks for debugging this... |
first of all thanks for gitgutter, awesome plugin.
since the latest sublime update, some of the gutter marks are lost on scroll for me: if i scroll the current region out of sight and quickly back into sight, some parts aren't marked as modified anymore. The following screenshots were taken seconds apart, nothing modified, simple scroll down and back up:
I don't see any errors in the console log, and on click or scroll left/right the gutter is redrawn and corrected... the minimap marks seem correct, making it more weird... when you grab it and quickly scroll to a region with many changes, sometimes nothing in the git gutter is marked?!?
Support Info
Already tried playing around with
debounce_delay
anddiff_algorithm
, no effect.The text was updated successfully, but these errors were encountered: