Use ▶ instead of ⯈, add opt where_separator

This commit is contained in:
Andy K. Massimino
2019-06-15 20:21:46 -04:00
parent 164086a3c2
commit f1a3948db9
2 changed files with 12 additions and 3 deletions

View File

@@ -59,6 +59,7 @@ function! s:init_options()
call s:init_option('matchup_surround_enabled', 0)
call s:init_option('matchup_where_enabled', 1)
call s:init_option('matchup_where_separator', '')
call s:init_option('matchup_matchpref', {})
endfunction

View File

@@ -9,10 +9,9 @@ scriptencoding utf8
let s:save_cpo = &cpo
set cpo&vim
let s:arrow = '⯈'
let s:curpos = []
function! matchup#where#get(timeout)
function! matchup#where#get(timeout) abort " {{{1
let l:save_view = winsaveview()
let l:trail = []
@@ -39,6 +38,8 @@ function! matchup#where#get(timeout)
return reverse(l:trail)
endfunction
" }}}1
function! s:print_verbose() " {{{1
let l:trail = matchup#where#get(400)
let l:last = -1
@@ -77,7 +78,7 @@ function! s:print_short() " {{{1
continue
endif
if l:prev != -1
let l:fullstr .= ' %#Title#'.s:arrow.'%#Normal# '
let l:fullstr .= ' %#Title#' . s:arrow() . '%#Normal# '
endif
let l:fullstr .= l:str
let l:prev = l:adj
@@ -87,6 +88,13 @@ function! s:print_short() " {{{1
call matchup#perf#toc('where', 'echohlstring')
endfunction
function! s:arrow()
if empty(g:matchup_where_separator)
return '▶'
endif
return g:matchup_where_separator
endfunction
" }}}1
function! matchup#where#print(args)