You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this is not a question that has been answered before, I searched everything related to diff-hl-margin-mode and could not find answer to this. The question is whether there is a way to utilize the margin (i.e. set its value to non-zero) only when there is a change in the file. This is to keep the margin minimal when diff-hl is the only one using it and the file has not been changed.
Thanks again
The text was updated successfully, but these errors were encountered:
It's a bit of a hassle to save the "previous" width before updating, to restoring it when no indicators are needed. This kind of code could be error-prone.
But that aside, would you really want the margin width jumping back-and-forth? Consider that the whole text of the window will jump by 1 column (horizontally) when that happens. You add a new char, save - and the text shifts to the right. You remove that char and save (or commit the changes) - the text goes back left.
I gave the git-gutter's Hide gutter if there are no changes a try and it wasn't bad, especially, in our case if we don't enable diff-hl-flydiff-mode and the "jump" only happens once you save the buffer. This provides more real estate on the sides for files which don't have a change. But if the implementation makes the code error-prone, I prefer the feature not to be there, especially if I am the only one who's asked for this. I like the stability of the package a lot.
Hello and thanks a lot for the awesome package.
I hope this is not a question that has been answered before, I searched everything related to
diff-hl-margin-mode
and could not find answer to this. The question is whether there is a way to utilize the margin (i.e. set its value to non-zero) only when there is a change in the file. This is to keep the margin minimal when diff-hl is the only one using it and the file has not been changed.Thanks again
The text was updated successfully, but these errors were encountered: