~toastal/vim-signify

1dfd3555c8750e065db53e8ce8f0d326378a585e — James McCoy 1 year, 2 months ago 6a9499c
sy#util#get_signs: Use a default priority of 10 if priorty is unlisted

Closes #406
1 files changed, 8 insertions(+), 2 deletions(-)

M autoload/sy/util.vim
M autoload/sy/util.vim => autoload/sy/util.vim +8 -2
@@ 242,11 242,17 @@ else

    let signlist = execute('sign place buffer='. buf)
    for signline in split(signlist, '\n')[2:]
      let tokens = matchlist(signline, '\v^\s+\S+\=(\d+)\s+\S+\=(\d+)\s+\S+\=(.*)\s+\S+\=(\d+)$')
      let tokens = matchlist(signline, '\v^\s+\S+\=(\d+)\s+\S+\=(\d+)\s+\S+\=(.{-})%(\s+\S+\=(\d+))=$')
      let line   = str2nr(tokens[1])
      let id     = str2nr(tokens[2])
      let name   = tokens[3]
      let priority = str2nr(tokens[4])
      let priority = tokens[4]
      if empty(priority)
        " Older Vim versions didn't report priority, so set the default value
        " manually
        let priority = '10'
      endif
      let priority = str2nr(priority)
      call add(signs, {
            \ 'lnum': line,
            \ 'id': id,