ema2159 / centaur-tabs

Emacs plugin aiming to become an aesthetic, modern looking tabs plugin
GNU General Public License v3.0
748 stars 51 forks source link

Tab shows modified file when it is not #111

Open idr4n opened 4 years ago

idr4n commented 4 years ago

Basically, the tabs are showing that a file is modified when it is actually not. I'm using Doom emacs, and this happens when I go into Normal mode (say with jk), the tab assumes that since I enter jk as characters that the buffer is modified when it is not. Changing tabs removes the 'modified' indicator from the tab.

This is my config:

(use-package! centaur-tabs
  :config
  (setq centaur-tabs-style "rounded"
        centaur-tabs-set-icons t
        centaur-tabs-set-modified-marker t
        centaur-tabs-modified-marker "●"
        centaur-tabs-height 32
        centaur-tabs-set-bar 'over
        )
  (centaur-tabs-headline-match)
  (centaur-tabs-mode)
  ;; (defun centaur-tabs-buffer-groups ()
  ;;   (list "GROUP"))
  (defun centaur-tabs-hide-tab (x)
    "Disable tabs for certain buffer types"
    (let ((name (format "%s" x)))
      (or
       (window-dedicated-p (selected-window))
       (string-prefix-p "*epc" name)
       (string-prefix-p "*Messages" name)
       (string-prefix-p "*scratch" name)
       (string-prefix-p "*org-roam" name)
       (string-prefix-p "*doom" name)
       (string-prefix-p "*which-key*" name)
       (string-prefix-p "*Compile-Log*" name)
       (string-prefix-p "*tide-server" name)
       (string-prefix-p "*lsp" name)
       (and (string-prefix-p "magit" name)
            (not (file-name-extension name))))))
  :hook
  (org-mode . centaur-tabs-local-mode)
)

Thanks in advance.

ema2159 commented 4 years ago

That's quite odd. Does the marker appears in all buffer types or in a specific buffer? After it appears, press `. in normal mode (go to the last modification in Evil/Vim), where does it land?

idr4n commented 4 years ago

Yes it appears in all buffers, doesn't matter the file type. In normal mode '. takes me to the place where I just typed jk to exit insert mode.

These screenshots show that the the file is saved, not modified, as the directory color in the bottom is green in both cases. However, in the second one, the modified marker in the tab shows after exiting normal mode with jk.

Screen Shot 2020-07-22 at 5 46 13 AM Screen Shot 2020-07-22 at 5 43 45 AM
ema2159 commented 4 years ago

That's very uncommon. Is there anywhere where I can see your configuration?

idr4n commented 4 years ago

That's very uncommon. Is there anywhere where I can see your configuration?

Sure, here it is my Doom Emacs config.