PJ Weisberg <[email protected]> writes: > I was just wondering, why does magit-mode set `truncate-lines' to t > and `line-move-visual' to nil? The very first customization I made > when I installed Magit, before I ever looked at it's code, was adding > this to my .emacs: > > (add-hook 'magit-mode-hook 'turn-on-visual-line-mode) > > That sets line-move-visual to t and truncate-lines to nil, and I > haven't seen any ill effects. > > If there's no good reason for it, I think it's better to not change > users' Emacs-wide settings.
I believe it is because the author of those line wanted to remove some possibly bad display of diff in some hunk as: + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, displayed as + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, In reading this one could believe that the "soft" second line is there in the text, neither added nor removed, when it is really part of an added line. That said, the use of colored diff render this justification less appealing. Emacs diff mode don't do that. -- Rémi Vanicat
