Tue, 19 Oct 2021 20:32:36 -0500
rework perltidy again
828 | 1 | " Why this wrapper? vim :term sets $TERM to xterm but supports -256color and |
2 | " all the suggestions for fixing that involve changing $TERM for vim itself | |
3 | " rather than just the subprocess. Also since this runs in place we can | |
4 | " switch back after. | |
5 | func! tig#Tig(...) abort | |
6 | call term_start( | |
7 | \ ['/usr/bin/env', 'TERM=xterm-256color', 'tig'] + a:000, | |
8 | \ {'curwin': 1, 'term_name': join(['!tig'] + a:000, ' '), 'exit_cb': 'tig#TigExit'} | |
9 | \ ) | |
10 | endfunc | |
11 | ||
12 | func! tig#TigBlame() abort | |
13 | call tig#Tig('blame', '+' . line('.'), '--', expand('%')) | |
14 | endfunc | |
15 | ||
16 | func! tig#TigExit(...) abort | |
17 | buffer # | |
18 | endfunc |