{"action":"created","issue":{"url":"https://api.github.com/repos/dgutov/diff-hl/issues/94","repository_url":"https://api.github.com/repos/dgutov/diff-hl","labels_url":"https://api.github.com/repos/dgutov/diff-hl/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/dgutov/diff-hl/issues/94/comments","events_url":"https://api.github.com/repos/dgutov/diff-hl/issues/94/events","html_url":"https://github.com/dgutov/diff-hl/issues/94","id":245469318,"number":94,"title":"Clipped diff-hl indicator on emacs master","user":{"login":"kaushalmodi","id":3578197,"avatar_url":"https://avatars2.githubusercontent.com/u/3578197?v=4","gravatar_id":"","url":"https://api.github.com/users/kaushalmodi","html_url":"https://github.com/kaushalmodi","followers_url":"https://api.github.com/users/kaushalmodi/followers","following_url":"https://api.github.com/users/kaushalmodi/following{/other_user}","gists_url":"https://api.github.com/users/kaushalmodi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaushalmodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaushalmodi/subscriptions","organizations_url":"https://api.github.com/users/kaushalmodi/orgs","repos_url":"https://api.github.com/users/kaushalmodi/repos","events_url":"https://api.github.com/users/kaushalmodi/events{/privacy}","received_events_url":"https://api.github.com/users/kaushalmodi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-25T17:03:19Z","updated_at":"2017-10-04T14:12:07Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI have been noticing this issue for a while now:\r\n\r\nBelow you see the same file buffer open in two windows.\r\n\r\n![image](https://user-images.githubusercontent.com/3578197/28580444-8719c9ea-712d-11e7-9a92-0ec451dfbd9b.png)\r\n\r\nThe buffer sharing the left border with the frame left border shows the `diff-hl` indicators fine. The window on the right has the same buffer but its indicator is getting clipped.\r\n\r\n*I have the new native support of line numbers enabled, but I see this issue with that off too.*\r\n\r\nI do not do anything fancy with `diff-hl` setup; it's being used as it is:\r\n\r\n```el\r\n(use-package diff-hl\r\n  :bind (:map modi-mode-map\r\n         (\"s-v\" . hydra-diff-hl/body)\r\n         (\"C-c v\" . hydra-diff-hl/body))\r\n  :init\r\n  (progn\r\n    (defconst modi/diff-hl-mode-hooks '(emacs-lisp-mode-hook\r\n                                        conf-space-mode-hook ;.tmux.conf\r\n                                        markdown-mode-hook\r\n                                        css-mode-hook\r\n                                        web-mode-hook\r\n                                        sh-mode-hook\r\n                                        yaml-mode-hook ;tmuxp yaml configs\r\n                                        c-mode-hook\r\n                                        org-mode-hook)\r\n      \"List of hooks of major modes in which diff-hl-mode should be enabled.\")\r\n\r\n    (dolist (hook modi/diff-hl-mode-hooks)\r\n      (add-hook hook #'diff-hl-mode))\r\n\r\n    (defhydra hydra-diff-hl (:color red)\r\n      \"diff-hl\"\r\n      (\"=\" diff-hl-diff-goto-hunk \"goto hunk\")\r\n      (\"<RET>\" diff-hl-diff-goto-hunk \"goto hunk\")\r\n      (\"u\" diff-hl-revert-hunk \"revert hunk\")\r\n      (\"[\" diff-hl-previous-hunk \"prev hunk\")\r\n      (\"p\" diff-hl-previous-hunk \"prev hunk\")\r\n      (\"]\" diff-hl-next-hunk \"next hunk\")\r\n      (\"n\" diff-hl-next-hunk \"next hunk\")\r\n      (\"a\" modi/add-change-log-entry-other-window-and-return \"add change log entry\")\r\n      (\"q\" nil \"cancel\"))\r\n\r\n    (add-hook 'dired-mode-hook #'diff-hl-dired-mode)))\r\n```\r\n\r\n---\r\n\r\nThe default fringe width is 8. If I do `(set-fringe-mode 10)`, the truncation goes away.. But if I save that and restart emacs, the truncation is back (and I checked that `fringe-mode` was still 10 after restart).\r\n\r\nI don't understand the emacs display mechanisms, so don't know why this bug doesn't affect the window that shares the left margin with the frame.\r\n\r\nHelp?"},"comment":{"url":"https://api.github.com/repos/dgutov/diff-hl/issues/comments/334168416","html_url":"https://github.com/dgutov/diff-hl/issues/94#issuecomment-334168416","issue_url":"https://api.github.com/repos/dgutov/diff-hl/issues/94","id":334168416,"user":{"login":"kaushalmodi","id":3578197,"avatar_url":"https://avatars2.githubusercontent.com/u/3578197?v=4","gravatar_id":"","url":"https://api.github.com/users/kaushalmodi","html_url":"https://github.com/kaushalmodi","followers_url":"https://api.github.com/users/kaushalmodi/followers","following_url":"https://api.github.com/users/kaushalmodi/following{/other_user}","gists_url":"https://api.github.com/users/kaushalmodi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaushalmodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaushalmodi/subscriptions","organizations_url":"https://api.github.com/users/kaushalmodi/orgs","repos_url":"https://api.github.com/users/kaushalmodi/repos","events_url":"https://api.github.com/users/kaushalmodi/events{/privacy}","received_events_url":"https://api.github.com/users/kaushalmodi/received_events","type":"User","site_admin":false},"created_at":"2017-10-04T14:12:07Z","updated_at":"2017-10-04T14:12:07Z","author_association":"NONE","body":"In the case you are not following the debbugs thread, here is the workaround:\r\n\r\n```el\r\n(use-package frame\r\n  :defer t\r\n  :config\r\n  (progn\r\n    (setq window-divider-default-places 'right-only) ;Default 'right-only\r\n    ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27830#20\r\n    ;; Workaround on emacs 26+ to prevent fringe truncation. You need to use\r\n    ;; either scroll bars or window dividers to prevent that.\r\n    ;; I dislike the default face of `window-divider', so I customize that in my\r\n    ;; `smyx-theme`.\r\n    (setq window-divider-default-right-width 1) ;Default 6\r\n    (window-divider-mode 1)))\r\n```\r\nThe `diff-hl` fringe looks great again after that:\r\n\r\n![image](https://user-images.githubusercontent.com/3578197/31180368-756136ce-a8ec-11e7-94db-edbce25751b8.png)\r\n"}}
{"actor":{"display_login":"kaushalmodi"}}