Skip to content
Myr

[vim] Use system-default border style

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* 'rounded' on non-Windows platforms * 'sharp' on Windows

authored by Junegunn Choi · committed by Junegunn Choi · parent dc8da60 · Browse files · 3 files+10 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+10 added−7 removed

  • other:+10 added−7 removed

3 files+10 added−7 removed

modified:doc/fzf.txt+1 added-1 removed
323 unmodified lines
324 - Optional:325 - `yoffset` [float default 0.5 range [0 ~ 1]]326 - `xoffset` [float default 0.5 range [0 ~ 1]]327 - `relative` [boolean default v:false]328 - `border` [string default `rounded`]: Border style328 - `border` [string default `rounded` (`sharp` on Windows)]: Border style329 - `rounded` / `sharp` / `horizontal` / `vertical` / `top` / `bottom` / `left` / `right` / `no[ne]`330331332FZF#WRAP
180 unmodified lines
modified:plugin/fzf.vim+8 added-5 removed
509 unmodified lines
510 elseif use_height511 let height = s:calc_size(&lines, dict.down, dict)512 let optstr .= ' --height='.height513 endif514 " Respect --border option given in 'options'515 if stridx(optstr, '--border') < 0 && stridx(optstr, '--no-border') < 0514 let optstr .= s:border_opt(get(dict, 'window', 0))516 let optstr .= s:border_opt(get(dict, 'window', 0))517 endif518 let prev_default_command = $FZF_DEFAULT_COMMAND519 if len(source_command)520 let $FZF_DEFAULT_COMMAND = source_command521 endif
235 unmodified lines
757 return ''758 endif759760 " Border style758 let style = tolower(get(a:window, 'border', 'rounded'))759 if !has_key(a:window, 'border') && !get(a:window, 'rounded', 1)760 let style = 'sharp'761 let style = tolower(get(a:window, 'border', ''))762 if !has_key(a:window, 'border') && has_key(a:window, 'rounded')763 let style = a:window.rounded ? 'rounded' : 'sharp'764 endif765 if style == 'none' || style == 'no'766 return ''767 endif768769 " For --border styles, we need fzf 0.24.0 or above770 call fzf#exec('0.24.0')768 let opt = ' --border=' . style771 let opt = ' --border ' . style772 if has_key(a:window, 'highlight')773 let color = s:get_color('fg', a:window.highlight)774 if len(color)775 let opt .= ' --color=border:' . color
288 unmodified lines
modified:README-VIM.md+1 added-1 removed
310 unmodified lines
311- Optional:312 - `yoffset` [float default 0.5 range [0 ~ 1]]313 - `xoffset` [float default 0.5 range [0 ~ 1]]314 - `relative` [boolean default v:false]315 - `border` [string default `rounded`]: Border style315 - `border` [string default `rounded` (`sharp` on Windows)]: Border style316 - `rounded` / `sharp` / `horizontal` / `vertical` / `top` / `bottom` / `left` / `right` / `no[ne]`317318`fzf#wrap`319----------
170 unmodified lines