commit 130c841287747167ecf1b68decfff7201d76e61b
parent cad62f5ec6f9cd94590cfe9ebd1310246d9adb46
Author: Jaehwang Jung <tomtomjhj@gmail.com>
Date: Sat, 13 Sep 2025 01:59:07 +0900
vim-patch:c849b17: runtime(netrw): Use correct "=~#" for the netrw_sizestyle='H' option
Correct expression syntax to match case in if and if-else clauses.
related: vim/vim#8535
closes: vim/vim#17901
https://github.com/vim/vim/commit/c849b17e192ca152573ea0c99b36755dc2f3ffb3
Co-authored-by: veotos <veotos@users.noreply.github.com>
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
@@ -1,6 +1,8 @@
" Creator: Charles E Campbell
" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
" Maintainer: This runtime file is looking for a new maintainer.
+" Last Change:
+" 2025 Aug 07 by Vim Project (use correct "=~#" for netrw_stylesize option #17901)
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -9229,7 +9231,7 @@ endfunction
" 1000 -> 1K, 1000000 -> 1M, 1000000000 -> 1G
function s:NetrwHumanReadable(sz)
- if g:netrw_sizestyle == 'h'
+ if g:netrw_sizestyle ==# 'h'
if a:sz >= 1000000000
let sz = printf("%.1f",a:sz/1000000000.0)."g"
elseif a:sz >= 10000000
@@ -9244,7 +9246,7 @@ function s:NetrwHumanReadable(sz)
let sz= a:sz
endif
- elseif g:netrw_sizestyle == 'H'
+ elseif g:netrw_sizestyle ==# 'H'
if a:sz >= 1073741824
let sz = printf("%.1f",a:sz/1073741824.0)."G"
elseif a:sz >= 10485760