summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/include_lua/print.lua
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/include_lua/print.lua')
-rw-r--r--apps/plugins/lua/include_lua/print.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/lua/include_lua/print.lua b/apps/plugins/lua/include_lua/print.lua
index 87fd11d4b6..5ea0423f01 100644
--- a/apps/plugins/lua/include_lua/print.lua
+++ b/apps/plugins/lua/include_lua/print.lua
@@ -299,23 +299,23 @@ local _print = {} do
299 end 299 end
300 300
301 -- Helper function that acts mostly like a normal printf() would 301 -- Helper function that acts mostly like a normal printf() would
302 local function printf(...) 302 local function printf(fmt, v1, ...)
303 local o = get_settings(true) 303 local o = get_settings(true)
304 local w, h, msg 304 local w, h, msg
305 local line = o.line - 1 -- rb is 0-based lua is 1-based 305 local line = o.line - 1 -- rb is 0-based lua is 1-based
306 306
307 if not (...) or (...) == "\n" then -- handles blank line / single '\n' 307 if not (fmt) or (fmt) == "\n" then -- handles blank line / single '\n'
308 local res, w, h = text_extent(" ", o.font) 308 local res, w, h = text_extent(" ", o.font)
309 309
310 clear_line(o, line, h) 310 clear_line(o, line, h)
311 update_line(o.autoupdate, o, line, h) 311 update_line(o.autoupdate, o, line, h)
312 312
313 if (...) then set_line(_NIL) end 313 if (fmt) then set_line(_NIL) end
314 314
315 return o.line, o.max_line, o.width, h 315 return o.line, o.max_line, o.width, h
316 end 316 end
317 317
318 msg = string.format(...) 318 msg = string.format(fmt, v1, ...)
319 319
320 show_selected(o.line, msg) 320 show_selected(o.line, msg)
321 321