Skip to content

Commit 5fad4c0

Browse files
jdsutherlandbergercookie
authored andcommitted
Fix lua boolean errors by wrapping tostring
1 parent 80295fc commit 5fad4c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ftplugin/lua.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function! s:DebugStringFunBase(desc, var)
2-
let l:debug_str = 'print("' . a:desc . '" .. ' . a:var . ')'
2+
let l:debug_str = 'print("' . a:desc . '" .. tostring(' . a:var . '))'
33
return l:debug_str
44
endfunc
55

test/ft/a.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
print("[[Vader-workbench]:$1$] DEBUGGING STRING ==> " .. $2$)
2-
print("a**2 + b**2: " .. a**2 + b**2)
1+
print("[[Vader-workbench]:$1$] DEBUGGING STRING ==> " .. tostring($2$))
2+
print("a**2 + b**2: " .. tostring(a**2 + b**2))

0 commit comments

Comments
 (0)