ZyX_I  committed c4bfdae

@%aurum/annotate: Now stripping whitespace characters at the start and end
of the description. Improved detection of full descriptions
syntax/aurumannotate: Now using virtual columns \%Nv atom, not relying
on 1 character = 1 column which is generally false

  • Participants
  • Parent commits cb852eb
  • Branches default

Comments (0)

Files changed (2)

File autoload/aurum/annotate.vim

 "▶1 formatann :: repo, cs, lnum, numlen → String
 function s:F.formatann(repo, cs, lnum, numlen)
     if !has_key(self, a:cs.hex)
-        let description=matchstr(a:cs.description, '\v[^\r\n]+')
+        let description=matchstr(a:cs.description, '\v\S@=\p.*\S@=\p')
+        let oldlen=len(description)
         while s:_r.strdisplaywidth(description, a:numlen+1)>30
             let description=substitute(description, '.$', '', '')
-        if len(description)<len(a:cs.description)
+        if len(description)<oldlen
             let description.='…'
         let descwidth=s:_r.strdisplaywidth(description, a:numlen+1)

File syntax/aurumannotate.vim

 syn match auAnnRevision    /\v^\ *\S+\ / nextgroup=auAnnDescription
-syn match auAnnDescription /\v.{31}/     nextgroup=auAnnDescNameSep contained
+syn match auAnnDescription /\v.*%38v/    nextgroup=auAnnDescNameSep contained
 syn match auAnnDescNameSep @\V / @       nextgroup=auAnnAuthor      contained
 syn match auAnnAuthor      /\v.*$/                                  contained