diff options
author | Frank Seifferth <frankseifferth@posteo.net> | 2021-05-11 22:17:03 +0200 |
---|---|---|
committer | Frank Seifferth <frankseifferth@posteo.net> | 2021-05-11 22:18:11 +0200 |
commit | 95315bf43a92beb006c5503aadf47738d5375143 (patch) | |
tree | f5ad4baacdf3b42154972855ff5e5a63d20f1267 | |
parent | f217b81692932f5d7fd3b037df49d47f79084f08 (diff) | |
download | vis-editorconfig-95315bf43a92beb006c5503aadf47738d5375143.tar.gz |
Fix usage of `file:content` for insert_final_newline
-rw-r--r-- | edconf.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -36,7 +36,7 @@ function insert_final_newline(file, path) -- therefore respect edconf_hooks_enabled. Since this function runs -- blazingly fast and scales with a complexity of O(1), however, -- there is no need to disable it. - if file:content(file.size-1, file.size) ~= '\n' then + if file:content(file.size-1, 1) ~= '\n' then file:insert(file.size, '\n') end end |