]> git.lizzy.rs Git - micro.git/commitdiff
stop version error when updating and option to disable builtin plugin. (#939)
authorTommy <tommy.shem1@googlemail.com>
Sun, 3 Dec 2017 17:41:22 +0000 (17:41 +0000)
committerZachary Yedidia <zyedidia@gmail.com>
Sun, 3 Dec 2017 17:41:22 +0000 (12:41 -0500)
runtime/plugins/literate/literate.lua

index aa41f4150efec945f3313473214f81a6c212a13f..913b2d3f7180a97c4f25b52b179166d4eb1079ff 100644 (file)
@@ -1,4 +1,7 @@
-VERSION = "1.0.0"
+-- VERSION = "1.0.0"
+if GetOption("literate") == nil then
+    AddOption("literate", true)
+end
 
 function startswith(str, start)
    return string.sub(str,1,string.len(start))==start
@@ -16,6 +19,7 @@ function split(string, sep)
 end
 
 function onViewOpen(view)
+    if not GetOption("literate") then return end
     if not endswith(view.Buf.Path, ".lit") then
         return
     end