Skip to content

Commit

Permalink
Merge pull request #12 from whiteinge/remove-vim-8-isms
Browse files Browse the repository at this point in the history
Replace getbufinfo() and lambda for ealier versions of Vim
  • Loading branch information
whiteinge authored Nov 13, 2018
2 parents 16b0806 + 9327ca8 commit 0890619
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions plugin/diffconflicts.vim
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,17 @@ function! s:showHistory()
endfunction

function! s:checkThenShowHistory()
let l:xs = filter(copy(getbufinfo()), {i, x ->
\ x.name =~# 'BASE' || x.name =~# 'LOCAL' || x.name =~# 'REMOTE'})
let l:xs =
\ filter(
\ map(
\ filter(
\ range(1, bufnr('$')),
\ 'bufexists(v:val)'
\ ),
\ 'bufname(v:val)'
\ ),
\ 'v:val =~# "BASE" || v:val =~# "LOCAL" || v:val =~# "REMOTE"'
\ )

if (len(l:xs) < 3)
echohl WarningMsg
Expand Down

0 comments on commit 0890619

Please sign in to comment.