mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-14 15:46:56 -05:00
This was an elusive bug caused by two upstream behaviors: 1. `kill-buffer` will silently refuse to kill a buffer if there is a thread associated with it. 2. `global-diff-hl-mode` activates `diff-hl-mode` in *most* buffers, even invisible ones. This calls `diff-hl-update` each time it does. This isn't a problem *unless* you have `diff-hl-update-async` enabled, because it creates a thread every time `diff-hl-update` is called. That means for every buffer -- real or transient -- you have a new thread queued. And this caused two main issues: 1. Temporary buffers are often opened and closed very rapidly (often faster than the thread can complete), so they weren't getting cleaned up. I hope you weren't too attached to your memory, because you'll have a lot of buried buffers to feed before long! 2. In cases where `diff-hl-update` simply takes a long time, multiple calls to it would queue more threads. When Emacs eventually yields the CPU to them, you'll get random, impossible-to-predict-or-track-down freezes. Joy! This may very well be enough reason to disable `diff-hl-update-async` by default, but I didn't want to give up on it *just* yet, despite how inelegant this solution is... Fix: #7954 Fix: #7991
:ui vc-gutter
Description unfold
This module displays a diff of the current file (against HEAD) in the fringe. Supports Git, Svn, Hg, and Bzr.
Maintainers
Module flags
- +pretty
- Apply some stylistic defaults to the fringe that present the diff in the fringe as thin bars, taking after the modern look of the git-gutter plugin in VSCode and Sublime Text. However, this will look bad with themes that invert the foreground/background of diff-hl's faces (like modus-themes does).
Packages
Hacks
- The VC gutter will be updated when pressing ESC, leaving insert mode (evil users), or refocusing the frame or window where it is active.
-
If doom-module:+pretty is enabled
- The fringes that diff-hl define will be replaced with a set of thin bars. This achieves a slicker look closer to git-gutter's appearance in VSCode or Sublime Text, but may look weird for themes that swap their faces' :foreground and :background (like modus-themes).
- The fringes are moved to the outside of the margins (closest to the frame edge), so they have some breathing space away from the buffer's contents.
diff-hl-revert-hunk
displays a preview popup of the hunk being reverted. It takes up ~50% of the frame, by default, whether you're reverting 2 lines or 20. Since this isn't easily customized, it has been advised to shrink this popup to the side of its contents.diff-hl-revert-hunk
will sometimes move the cursor to an unexpected location (the bounds of hunks, is my guess), but this is not intuitive and often unexpected. Cursor movements have been suppressed for it.
TODO Changelog
This module does not have a changelog yet.
Installation
Enable this module in your doom!
block.
This module requires any of Git, Svn, Hg, and/or Bazaar to get gutter diffs in projects version controlled by them.
TODO Usage
This module has no usage documentation yet. Write some?
TODO Configuration
This module has no configuration documentation yet. Write some?
Troubleshooting
There are no known problems with this module. Report one?
Frequently asked questions
This module has no FAQs yet. Ask one?
TODO Appendix
This module has no appendix yet. Write one?