Merge remote-tracking branch 'zyx-i/fix-567' into develop

This commit is contained in:
Kim Silkebækken 2013-06-28 13:37:50 +02:00
commit fc6d85219f
1 changed files with 2 additions and 0 deletions

View File

@ -177,6 +177,8 @@ def file_size(pl, suffix='B', si_prefix=False):
# Note: returns file size in &encoding, not in &fileencoding. But returned
# size is updated immediately; and it is valid for any buffer
file_size = vim_funcs['line2byte'](len(vim.current.buffer) + 1) - 1
if file_size < 0:
file_size = 0
return humanize_bytes(file_size, suffix, si_prefix)