Commits

ZyX_I  committed c4de647

@/table: Added fullwidth characters support for legacy strdisplaywidth

  • Participants
  • Parent commits 70b326b

Comments (0)

Files changed (1)

File plugin/frawor/table.vim

         for char in chars
             if char[0] is# "\t"
                 let curcol+=(&ts-curcol%&ts)
-            " TODO fullwidth characters?
             else
-                let curcol+=1
+                let charnr=char2nr(char[0])
+                let curcol+=1+((0xFF00< charnr && charnr<=0xFF60) ||
+                            \  (0xFFE0<=charnr && charnr<=0xFFE6) ||
+                            \  charn==0x3000)
             endif
         endfor
         return curcol-a:col