gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
8.98k stars 1.32k forks source link

Line annotations some times mess with white space. #176

Closed mcarpenterjr closed 6 years ago

mcarpenterjr commented 7 years ago

Steps to Reproduce:

  1. Write some code in a pre-existing repository
  2. Create a new line and press tab, get more whitespace than expected.

Sometimes when writing code if the annotation passes the soft break the workspace scrolls way off to the side also.

If lens is disabled or removed the problem goes away.

Otherwise great extension.

eamodio commented 7 years ago

Can you provide more details -- what type of file? what language? Also can you maybe include a screen capture of it?

I can't reproduce the behavior, but I'm not sure I'm doing it properly.

mcarpenterjr commented 7 years ago

I've noticed this in JS, HTML, and PHP

It happens what seems like randomly, I will try and get a gif for you.

eamodio commented 6 years ago

@mcarpenterjr could the issue you are seeing be this one: https://github.com/Microsoft/vscode/issues/36873?

mcarpenterjr commented 6 years ago

Nope, it's the line annotations from gitlens, I have a better understanding of what's occuring now. It does happen at what seems like random so it's hard to capture the behavior through Peek to create a gif.

This occurs in CSS JS HTML and PHP files.

While coding the line annotation (the light gray entry that has the user's name time of last commit and the commit title) will appear, this forces the cursor to the end of the annotation, the annotation will then disappear just as quickly as it appeared but leave behind excessive white space. What I would assume is padding around the annotation. In cases where the line is long and is approaching the softwrap bar, the annotation will actually ignore the softwrap and cause the workspace to scroll horizontally. What it seems like is occurring is the cursor is getting pushed into the great beyond past the softwrap and forces the view to scroll.

Also, I managed to get a partial instance of this occurring... wooo

eamodio commented 6 years ago

OK, I have posted on https://github.com/Microsoft/vscode/issues/34441, which I think this is related to.

Although from your gif -- do you have your auto-save set to some extremely small timeout? Because GitLens should be not showing those annotations while you are editing (i.e. unsaved)

mcarpenterjr commented 6 years ago

Autosave is on, I have not changed the timeout, so maybe that needs a BUMP.

mcarpenterjr commented 6 years ago

The default for autosave is 1000... ms? that's low.

eamodio commented 6 years ago

Hrm, every second is pretty low. I'm guessing part of the problem is that I debounce the events and if its getting hit with a bunch of save/dirty/save/dirty events I am likely skipping some. I'll have to think a bit on how best to protect against that.

Thanks for the extra info!

mcarpenterjr commented 6 years ago

bitmoji

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.