This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Copyright 2015 Paul Kulchenko, ZeroBrane LLC; All rights reserved | |
return { | |
name = "File type based on Shebang", | |
description = "Sets file type based on executable in shebang.", | |
author = "Paul Kulchenko", | |
version = 0.1, | |
dependencies = 1.0, | |
onEditorLoad = function(self, editor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/editor/commands.lua b/src/editor/commands.lua | |
index f02d161..daf37da 100644 | |
--- a/src/editor/commands.lua | |
+++ b/src/editor/commands.lua | |
@@ -1033,5 +1033,7 @@ frame:Connect(wx.wxEVT_IDLE, | |
if #ide.onidle > 0 then table.remove(ide.onidle)() end | |
if #ide.onidle > 0 then event:RequestMore(true) end -- request more if anything left | |
+ ide:SetStatus(math.floor(collectgarbage("count")).."Kb") | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: wxLua/bindings/wxwidgets/wx_datatypes.lua | |
=================================================================== | |
--- wxLua/bindings/wxwidgets/wx_datatypes.lua (revision 245) | |
+++ wxLua/bindings/wxwidgets/wx_datatypes.lua (working copy) | |
@@ -438,13 +438,13 @@ | |
ValueType = "enum", | |
}, | |
wxAuiNotebookPage = { | |
- Condition = "wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI", | |
+ Condition = "(wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) && (!wxCHECK_VERSION(3,1,0))", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function plaindump(val, opts, done) | |
local keyignore = opts and opts.keyignore or {} | |
local final = done == nil | |
opts, done = opts or {}, done or {} | |
local t = type(val) | |
if t == "table" then | |
done[#done+1] = '{' | |
done[#done+1] = '' | |
for key, value in pairs (val) do | |
if not keyignore[key] then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <windows.h> | |
int main (int argc, char *argv[]) | |
{ | |
char buffer[MAX_PATH],*file; | |
if (!GetFullPathName(argv[0],MAX_PATH,buffer,&file)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/util.lua b/src/util.lua | |
index ad4cbe3..573482f 100644 | |
--- a/src/util.lua | |
+++ b/src/util.lua | |
@@ -267,25 +267,22 @@ function FileSysGetRecursive(path, recursive, spec, opts) | |
end | |
local normalflags = wx.wxPATH_NORM_ABSOLUTE + wx.wxPATH_NORM_DOTS + wx.wxPATH_NORM_TILDE | |
-function GetFullPathIfExists(p, f) | |
+function MergeFullPath(p, f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/editor/package.lua b/src/editor/package.lua | |
index a1149e0..aba9db2 100644 | |
--- a/src/editor/package.lua | |
+++ b/src/editor/package.lua | |
@@ -175,7 +175,8 @@ function ide:MakeMenu(t) | |
menu:Append(id, label, submenu, help or "") | |
else | |
local item = wx.wxMenuItem(menu, id, label, help or "", kind or wx.wxITEM_NORMAL) | |
- if menuicon and type(iconmap[id]) == "table" then | |
+ if menuicon and type(iconmap[id]) == "table" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dofile 'interpreters/luabase.lua' | |
local intr = MakeLuaInterpreter() | |
intr.name = "Lua PP" | |
intr.frun = function(self,wfilename,rundebug) | |
local exe = self:fexepath("") | |
local filepath = wfilename:GetFullPath() | |
do | |
-- if running on Windows and can't open the file, this may mean that | |
-- the file path includes unicode characters that need special handling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local init = [=[ | |
(loadstring or load)([[ | |
if pcall(require, "mobdebug") then | |
local mdb = require "mobdebug" | |
mdb.linemap = function(line, src) return codemap[src][line] end | |
end | |
]])() | |
]=] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debugger.init = [[ | |
local mdb = require('mobdebug') | |
local dump = mdb.dump | |
mdb.dump = function(v, opts) | |
opts = opts or {sortkeys = true, comment = true} | |
opts.maxlevel = 6 | |
return dump(v, opts) | |
end | |
]] |