~toastal/vim-signify

7d538b77a5a8806e344b057f8846f6d0c035efa9 — James McCoy 1 year, 2 months ago 6a9499c + 1dfd355 main
Merge pull request #407 from jamessan/sign-priority

sy#util#get_signs: Use a default priority of 10 if priorty is unlisted
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,