projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9cd010
)
Don't generate trailing spaces in minetest.conf.example
author
est31
<MTest31@outlook.com>
Sat, 27 Feb 2016 04:26:58 +0000
(
05:26
+0100)
committer
est31
<MTest31@outlook.com>
Sat, 27 Feb 2016 04:49:22 +0000
(
05:49
+0100)
If the default value of a setting was empty,
it previously generated a trailing space.
builtin/mainmenu/dlg_settings_advanced.lua
patch
|
blob
|
history
diff --git
a/builtin/mainmenu/dlg_settings_advanced.lua
b/builtin/mainmenu/dlg_settings_advanced.lua
index 35883f05fd76ba9f5e1f48a65b613b3b7dad0436..cab9f169e6ffd93a14b3ee71015e2068a0a91e4f 100644
(file)
--- a/
builtin/mainmenu/dlg_settings_advanced.lua
+++ b/
builtin/mainmenu/dlg_settings_advanced.lua
@@
-706,7
+706,11
@@
local function create_minetest_conf_example()
result = result .. " possible values: " .. entry.possible:gsub(",", ", ")
end
result = result .. "\n"
- result = result .. "# " .. entry.name .. " = ".. entry.default .. "\n\n"
+ local append = ""
+ if entry.default ~= "" then
+ append = " " .. entry.default
+ end
+ result = result .. "# " .. entry.name .. " =" .. append .. "\n\n"
end
end
return result