Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange background showing #63

Open
sudipghimire533 opened this issue Jul 4, 2021 · 2 comments
Open

Strange background showing #63

sudipghimire533 opened this issue Jul 4, 2021 · 2 comments

Comments

@sudipghimire533
Copy link

I tried to achive the same looks as in screenshot of README and I say I only got something partial. Here is the actual screenshot
image
The green background throughout the tabline spoiled the looks. and also notice buffer are separating ini weird way (with black background and white seperator)

@qaqcxh
Copy link

qaqcxh commented Jan 2, 2022

I found a workaround: just add "set termguicolors" to your .vimrc

@qaqcxh
Copy link

qaqcxh commented Jan 2, 2022

I solved this problem finaly, you should replace "if has("gui") || has(”termguicolors)" to "if has("gui_running")" in buffet.vim and then modify some ctermfg or ctermbg to a name.

Here is the patch:

diff --git a/plugin/buffet.vim b/plugin/buffet.vim
index cb1e969..a24bfb4 100644
--- a/plugin/buffet.vim
+++ b/plugin/buffet.vim
@@ -11,7 +11,7 @@ augroup buffet_show_tabline
     autocmd VimEnter,BufAdd,TabEnter * set showtabline=2
 augroup END
 
-if has("gui") || has("termguicolors")
+if has("gui_running")
     if !get(g:, "buffet_use_gui_tablne", 0)
         set guioptions-=e
     endif
@@ -111,7 +111,7 @@ endfor
 function! s:GetHiAttr(name, attr)
     let vim_mode = "cterm"
     let attr_suffix = ""
-    if has("gui") || has('termguicolors')
+    if has("gui_running")
         let vim_mode = "gui"
         let attr_suffix = "#"
     endif
@@ -123,7 +123,7 @@ endfunction
 
 function! s:SetHi(name, fg, bg)
     let vim_mode = "cterm"
-    if has("gui") || has("termguicolors")
+    if has("gui_running")
         let vim_mode = "gui"
     endif
 
@@ -157,16 +157,16 @@ function! s:SetColors()
     " Issue: https://github.com/bagrat/vim-buffet/issues/5
     " if get(g:, "buffet_match_color_scheme", 1)
 
-    hi! BuffetCurrentBuffer cterm=NONE ctermbg=2 ctermfg=8 guibg=#00FF00 guifg=#000000
-    hi! BuffetActiveBuffer cterm=NONE ctermbg=10 ctermfg=2 guibg=#999999 guifg=#00FF00
-    hi! BuffetBuffer cterm=NONE ctermbg=10 ctermfg=8 guibg=#999999 guifg=#000000
+    hi! BuffetCurrentBuffer cterm=NONE ctermbg=green ctermfg=black guibg=#6aa84f guifg=#000000
+    hi! BuffetActiveBuffer cterm=NONE ctermbg=grey ctermfg=green guibg=#999999 guifg=#6aa84f
+    hi! BuffetBuffer cterm=NONE ctermbg=grey ctermfg=black guibg=#999999 guifg=#000000
 
     hi! link BuffetModCurrentBuffer BuffetCurrentBuffer
     hi! link BuffetModActiveBuffer BuffetActiveBuffer
     hi! link BuffetModBuffer BuffetBuffer
 
-    hi! BuffetTrunc cterm=bold ctermbg=11 ctermfg=8 guibg=#999999 guifg=#000000
-    hi! BuffetTab cterm=NONE ctermbg=4 ctermfg=8 guibg=#0000FF guifg=#000000
+    hi! BuffetTrunc cterm=bold ctermbg=grey ctermfg=black guibg=#999999 guifg=#000000
+    hi! BuffetTab cterm=NONE ctermbg=blue ctermfg=black guibg=#3d85c6 guifg=#000000
 
     hi! link BuffetLeftTrunc BuffetTrunc
     hi! link BuffetRightTrunc BuffetTrunc
@@ -179,7 +179,7 @@ function! s:SetColors()
     for left in keys(g:buffet_has_separator)
         for right in keys(g:buffet_has_separator[left])
             let vim_mode = "cterm"
-            if has("gui") || has("termguicolors")
+            if has("gui_running")
                 let vim_mode = "gui"
             endif
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants