Skip to content

Commit 5ae8cff

Browse files
committed
[fix] fixed error "using Float as a String" when system locale using comma as float separator
1 parent 0c2a0fe commit 5ae8cff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

autoload/GoldenView.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ function! GoldenView#Init()
2525
return
2626
endif
2727

28-
let s:goldenview__golden_ratio = 1.618
28+
let l:golden_ratio_dot = str2float("1.612")
29+
let l:golden_ratio_comma = str2float("1,612")
30+
if l:golden_ratio_dot > l:golden_ratio_comma
31+
let s:goldenview__golden_ratio = l:golden_ratio_dot
32+
else
33+
let s:goldenview__golden_ratio = l:golden_ratio_comma
34+
endif
2935
lockvar s:goldenview__golden_ratio
3036

3137
set equalalways

0 commit comments

Comments
 (0)