don't warn when editing ktxt2 file itself

This commit is contained in:
2021-12-17 15:19:11 -07:00
parent 095a5df195
commit f8320ecd34

View File

@@ -239,11 +239,12 @@
->e
(let [f e.document.fileName
dir (FileSystem.readDirectory (f.directory))]
(doFor otherF dir
(whenLet [(Some _) (indexOf otherF (.withoutDirectory (f.withoutExtension)))
(Some _) (indexOf otherF (f.extension))
true (otherF.endsWith ".ktxt2")]
(errorMessage "Editing file $(f.withoutDirectory) which is managed by $(otherF.withoutDirectory)"))))))
(unless (f.endsWith "ktxt2")
(doFor otherF dir
(whenLet [(Some _) (indexOf otherF (.withoutDirectory (f.withoutExtension)))
(Some _) (indexOf otherF (f.extension))
true (otherF.endsWith ".ktxt2")]
(errorMessage "Editing file $(f.withoutDirectory) which is managed by $(otherF.withoutDirectory)")))))))
// TODO standardize this with KissInterp
(function :Void prepareInterp []