mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Clean up some lint
This commit is contained in:
@@ -594,7 +594,7 @@ function! s:parser_delim_new(lnum, cnum, opts) " {{{1
|
||||
" handle syntax check- currently used for 'same' matches
|
||||
if has_key(l:extra_entry, 'syn')
|
||||
let l:pat = l:extra_entry.syn
|
||||
if l:pat[0] == '!'
|
||||
if l:pat[0] ==? '!'
|
||||
let l:pat = l:pat[1:]
|
||||
if matchup#util#in_synstack(l:pat, a:lnum, a:cnum)
|
||||
continue
|
||||
|
||||
@@ -51,7 +51,7 @@ function! matchup#perf#show_times()
|
||||
end
|
||||
|
||||
echohl Title
|
||||
echo printf("%42s%11s%17s", 'average', 'last', 'maximum')
|
||||
echo printf('%42s%11s%17s', 'average', 'last', 'maximum')
|
||||
echohl None
|
||||
for l:c in l:contexts
|
||||
echohl Special
|
||||
@@ -60,7 +60,7 @@ function! matchup#perf#show_times()
|
||||
let l:states = filter(copy(l:keys), 'v:val =~# "^\\V'.l:c.'#"')
|
||||
call sort(l:states, 's:sort_by_last')
|
||||
for l:s in l:states
|
||||
echo printf(" %-25s%12.2gms%12.2gms%12.2gms",
|
||||
echo printf(' %-25s%12.2gms%12.2gms%12.2gms',
|
||||
\ join(split(l:s,'#')[1:],'#'),
|
||||
\ 1000*g:matchup#perf#times[l:s].emavg,
|
||||
\ 1000*g:matchup#perf#times[l:s].last,
|
||||
|
||||
@@ -52,11 +52,11 @@ function! matchup#quirks#status_adjust(offscreen) abort " {{{1
|
||||
" go up to next line with same indent (up to s:adjust_max)
|
||||
for l:adjust in range(-1, -s:adjust_max, -1)
|
||||
let l:lnum = a:offscreen.lnum + l:adjust
|
||||
if getline(l:lnum) =~ '^\s*$'
|
||||
if getline(l:lnum) =~? '^\s*$'
|
||||
break
|
||||
endif
|
||||
if indent(l:lnum) == l:target
|
||||
\ && getline(l:lnum) !~ '^\s*\%(#\|/\*\|//\)'
|
||||
\ && getline(l:lnum) !~? '^\s*\%(#\|/\*\|//\)'
|
||||
return l:adjust
|
||||
endif
|
||||
endfor
|
||||
|
||||
Reference in New Issue
Block a user