aboutsummaryrefslogtreecommitdiffstats
path: root/edconf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'edconf.lua')
-rw-r--r--edconf.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/edconf.lua b/edconf.lua
index 6abe2c9..7b42173 100644
--- a/edconf.lua
+++ b/edconf.lua
@@ -124,13 +124,8 @@ OPTIONS = {
-- Quote: insert_final_newline Set to true ensure file ends with a
-- newline when saving and false to ensure it doesn’t.
--
- if value == "true" then
- set_pre_save(insert_final_newline, "true")
- set_pre_save(strip_final_newline, "false")
- elseif value == "false" then
- set_pre_save(strip_final_newline, "true")
- set_pre_save(insert_final_newline, "false")
- end
+ set_pre_save(insert_final_newline, tostring(value == "true"))
+ set_pre_save(strip_final_newline, tostring(value == "false"))
end,
trim_trailing_whitespace = function (value)