Skip to content

Commit c849b17

Browse files
veotoschrisbra
authored andcommitted
runtime(netrw): Use correct "=~#" for the netrw_sizestyle='H' option
Correct expression syntax to match case in if and if-else clauses. related: #8535 closes: #17901 Signed-off-by: veotos <veotos@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 93f6454 commit c849b17

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • runtime/pack/dist/opt/netrw/autoload

runtime/pack/dist/opt/netrw/autoload/netrw.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
" Creator: Charles E Campbell
22
" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
33
" Maintainer: This runtime file is looking for a new maintainer.
4+
" Last Change:
5+
" 2025 Aug 07 by Vim Project (use correct "=~#" for netrw_stylesize option #17901)
46
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
57
" Permission is hereby granted to use and distribute this code,
68
" with or without modifications, provided that this copyright
@@ -9225,7 +9227,7 @@ endfunction
92259227
" 1000 -> 1K, 1000000 -> 1M, 1000000000 -> 1G
92269228
function s:NetrwHumanReadable(sz)
92279229

9228-
if g:netrw_sizestyle == 'h'
9230+
if g:netrw_sizestyle ==# 'h'
92299231
if a:sz >= 1000000000
92309232
let sz = printf("%.1f",a:sz/1000000000.0)."g"
92319233
elseif a:sz >= 10000000
@@ -9240,7 +9242,7 @@ function s:NetrwHumanReadable(sz)
92409242
let sz= a:sz
92419243
endif
92429244

9243-
elseif g:netrw_sizestyle == 'H'
9245+
elseif g:netrw_sizestyle ==# 'H'
92449246
if a:sz >= 1073741824
92459247
let sz = printf("%.1f",a:sz/1073741824.0)."G"
92469248
elseif a:sz >= 10485760

0 commit comments

Comments
 (0)