File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,8 @@ converters['in'] = {
177177}
178178
179179local function hex_to_rgb (val )
180- local hex = val :gsub (" #" , " " )
180+ local str = tostring (val )
181+ local hex = str :gsub (" #" , " " )
181182
182183 if # hex == 3 then
183184 local r = tonumber (hex :sub (1 , 1 ) .. hex :sub (1 , 1 ), 16 )
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ M.open_win = function(found_units)
105105 for i = # found_units , 1 , - 1 do
106106 local match = found_units [i ]
107107 if match .unit == from_unit then
108- local converted = calculator .convert (from_unit , to_unit , match .val )
108+ local converted = calculator .convert (from_unit , to_unit , tonumber ( match .val ) )
109109 vim .api .nvim_buf_set_text (
110110 bufnr ,
111111 match .pos .row - 1 ,
You can’t perform that action at this time.
0 commit comments