From b2e96b9acded6ff0ede1fc01eb8ddfccc5b7a069 Mon Sep 17 00:00:00 2001 From: Carl Kamholtz Date: Sat, 23 Jul 2022 18:14:34 +1000 Subject: [PATCH 1/4] fzf options to force 24 bit colors --- plugin/fzf.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 85d1f2fa087..e61cb538666 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -342,7 +342,8 @@ function! s:common_sink(action, lines) abort endfunction function! s:get_color(attr, ...) - let gui = !s:is_win && !has('win32unix') && has('termguicolors') && &termguicolors + " Force 24 bit colors: g:fzf_force_24_bit_colors + let gui = (exists('g:fzf_force_24_bit_colors') && g:fzf_force_24_bit_colors) || (!s:is_win && !has('win32unix') && has('termguicolors') && &termguicolors) let fam = gui ? 'gui' : 'cterm' let pat = gui ? '^#[a-f0-9]\+' : '^[0-9]\+$' for group in a:000 From 9aa5dbae200102e1128c7d52cc2b930d6ed7d744 Mon Sep 17 00:00:00 2001 From: Carl Kamholtz Date: Sat, 23 Jul 2022 18:19:01 +1000 Subject: [PATCH 2/4] Add global option g:fzf_force_24_bit_colors to docs --- doc/fzf.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/fzf.txt b/doc/fzf.txt index 94857232b31..31482b9d776 100644 --- a/doc/fzf.txt +++ b/doc/fzf.txt @@ -130,6 +130,8 @@ Note that the environment variables `FZF_DEFAULT_COMMAND` and - Customizes fzf colors to match the current color scheme - `g:fzf_history_dir` - Enables history feature + - `g:fzf_force_24_bit_colors` + - Force use of 24 bit colors Examples~ From 8cebbd72f7536b805f5412f3cfa947d1dbd3acda Mon Sep 17 00:00:00 2001 From: Carl Kamholtz Date: Fri, 29 Jul 2022 22:00:47 +1000 Subject: [PATCH 3/4] Update doc/fzf.txt Co-authored-by: Junegunn Choi --- doc/fzf.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/fzf.txt b/doc/fzf.txt index 31482b9d776..94857232b31 100644 --- a/doc/fzf.txt +++ b/doc/fzf.txt @@ -130,8 +130,6 @@ Note that the environment variables `FZF_DEFAULT_COMMAND` and - Customizes fzf colors to match the current color scheme - `g:fzf_history_dir` - Enables history feature - - `g:fzf_force_24_bit_colors` - - Force use of 24 bit colors Examples~ From 3e958d8d4c5051f0829b05ced62e83b5b3a3a375 Mon Sep 17 00:00:00 2001 From: Carl Kamholtz Date: Fri, 29 Jul 2022 22:01:39 +1000 Subject: [PATCH 4/4] Update plugin/fzf.vim Use existing option name Co-authored-by: Junegunn Choi --- plugin/fzf.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 867f97922ca..c27c9e563d1 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -342,8 +342,8 @@ function! s:common_sink(action, lines) abort endfunction function! s:get_color(attr, ...) - " Force 24 bit colors: g:fzf_force_24_bit_colors - let gui = (exists('g:fzf_force_24_bit_colors') && g:fzf_force_24_bit_colors) || (!s:is_win && !has('win32unix') && has('termguicolors') && &termguicolors) + " Force 24 bit colors: g:fzf_force_termguicolors (temporary workaround for https://github.com/junegunn/fzf.vim/issues/1152) + let gui = get(g:, 'fzf_force_termguicolors', 0) || (!s:is_win && !has('win32unix') && has('termguicolors') && &termguicolors) let fam = gui ? 'gui' : 'cterm' let pat = gui ? '^#[a-f0-9]\+' : '^[0-9]\+$' for group in a:000