diff options
author | Francesco <francesco.bbt@gmail.com> | 2021-08-23 18:50:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-23 18:50:31 +0200 |
commit | 328eaa5945f611212608a304876af4f68536c901 (patch) | |
tree | 9b75b6d32c90770ca8af92c2a42eb8ca32104801 | |
parent | dfe585a4459ea9a1acaa1a66b06a8ec18103e843 (diff) | |
parent | 08ac68bd83c90eb84d11a88c39dca6eb55842cea (diff) | |
download | lite-xl-plugins-328eaa5945f611212608a304876af4f68536c901.tar.gz lite-xl-plugins-328eaa5945f611212608a304876af4f68536c901.zip |
Merge pull request #56 from Guldoman/lfautoindent_newfile
`lfautoinsert`: Avoid touching new files
-rw-r--r-- | plugins/lfautoinsert.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/lfautoinsert.lua b/plugins/lfautoinsert.lua index 5f4148b..a156964 100644 --- a/plugins/lfautoinsert.lua +++ b/plugins/lfautoinsert.lua @@ -41,6 +41,7 @@ config.plugins.lfautoinsert = { map = { local function get_autoinsert_map(filename) local map = {} + if not filename then return map end for pattern, closing in pairs(config.plugins.lfautoinsert.map) do if type(closing) == "table" then if common.match_pattern(filename, closing.file_patterns) then |