Ban use of ==# or ==? in the codebase, and prefer is# or is? instead

This commit is contained in:
w0rp
2017-08-08 08:39:13 +01:00
parent 5010ddc28f
commit a535d07f28
61 changed files with 158 additions and 154 deletions

View File

@@ -17,7 +17,7 @@ function! ale#loclist_jumping#FindNearest(direction, wrap) abort
let l:search_item = {'lnum': l:pos[1], 'col': l:pos[2]}
" When searching backwards, so we can find the next smallest match.
if a:direction ==# 'before'
if a:direction is# 'before'
let l:loclist = reverse(copy(l:loclist))
endif
@@ -36,11 +36,11 @@ function! ale#loclist_jumping#FindNearest(direction, wrap) abort
\ l:search_item
\)
if a:direction ==# 'before' && l:cmp_value < 0
if a:direction is# 'before' && l:cmp_value < 0
return [l:item.lnum, l:item.col]
endif
if a:direction ==# 'after' && l:cmp_value > 0
if a:direction is# 'after' && l:cmp_value > 0
return [l:item.lnum, l:item.col]
endif
endfor