Skip to content

Commit

Permalink
Warn when number format is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbra committed Jan 11, 2012
1 parent a0c2830 commit 9d831d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ftplugin/csv.vim
Expand Up @@ -976,6 +976,11 @@ fu! csv#EvalColumn(nr, func, first, last) range "{{{3
" parse the optional number format
let str = matchstr(format, '/\zs[^/]*\ze/', 0, start)
let s = matchlist(str, '\(.\)\?:\(.\)\?')[1:2]
if len(s) == 0
" Number format wrong
call <sid>Warn("Numberformat wrong, needs to be /x:y/!")
return ''
endif
if !empty(s[0])
let s:nr_format[0] = s[0]
endif
Expand Down

0 comments on commit 9d831d9

Please sign in to comment.