mirror of
https://github.com/powerline/powerline.git
synced 2025-07-31 01:35:40 +02:00
Merge remote-tracking branch 'zyx-i/fix-567' into develop
This commit is contained in:
commit
fc6d85219f
@ -177,6 +177,8 @@ def file_size(pl, suffix='B', si_prefix=False):
|
|||||||
# Note: returns file size in &encoding, not in &fileencoding. But returned
|
# Note: returns file size in &encoding, not in &fileencoding. But returned
|
||||||
# size is updated immediately; and it is valid for any buffer
|
# size is updated immediately; and it is valid for any buffer
|
||||||
file_size = vim_funcs['line2byte'](len(vim.current.buffer) + 1) - 1
|
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)
|
return humanize_bytes(file_size, suffix, si_prefix)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user