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
function initCanvas(w, h) | |
local canvas = document:createElement("canvas") | |
canvas.id = "canvas" | |
canvas.width = w | |
canvas.height = h | |
canvas.style.width = canvas.width .. 'px' | |
canvas.style.height = canvas.height .. 'px' | |
document:getElementsByTagName('body')[0]:appendChild(canvas) | |
end | |
initCanvas(300, 300) |
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
-- author: Paul Kulchenko | |
--------------------------------------------------------- | |
local funccall = "([A-Za-z_][A-Za-z0-9_]*)%s*" | |
return { | |
exts = {"js", "json"}, | |
lexer = wxstc.wxSTC_LEX_ESCRIPT, | |
apitype = "js", | |
linecomment = "//", |
This file has been truncated, but you can view the full 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
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC | |
-- Created by Danny Boisvert (derived from love2d.lua) | |
local urho3d | |
local win = ide.osname == "Windows" | |
local mac = ide.osname == "Macintosh" | |
local interpreter = { | |
name = "Urho3D", | |
description = "Urho3D game engine", |
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 focusOnEnterWindow(editor) | |
editor:Connect(wx.wxEVT_ENTER_WINDOW, function() editor:SetFocus() end) | |
end | |
return { | |
name = "Editor auto-focus by mouse", | |
description = "Moves focus to an editor tab the mouse is over.", | |
author = "Paul Kulchenko", | |
version = 0.1, | |
onEditorLoad = function(self, editor) focusOnEnterWindow(editor) 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
local G = ... | |
local id = G.ID("clippy.clippy") | |
local menuid | |
local stack = {} | |
local kStackLimit = 10 | |
local function SaveClip() | |
local tdo = wx.wxTextDataObject("None") | |
if wx.wxClipboard:Get():Open() then | |
wx.wxClipboard:Get():GetData(tdo) |
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 2011-14 Paul Kulchenko, ZeroBrane LLC | |
-- Original authors: Lomtik Software (J. Winwood & John Labenski) | |
-- Luxinia Dev (Eike Decker & Christoph Kubisch) | |
-- Integration with MobDebug | |
--------------------------------------------------------- | |
local copas = require "copas" | |
local socket = require "socket" | |
local mobdebug = require "mobdebug" | |
local unpack = table.unpack or unpack |
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 | |
local updateneeded | |
local indicator = 12 | |
return { | |
name = "Highlight selected", | |
description = "Highlights all instances of a selected word.", | |
author = "Paul Kulchenko", | |
version = 0.11, | |
dependencies = 0.71, |
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/editor.lua b/src/editor/editor.lua | |
index 09046d3..49ce2a7 100644 | |
--- a/src/editor/editor.lua | |
+++ b/src/editor/editor.lua | |
@@ -240,7 +240,9 @@ function EditorAutoComplete(editor) | |
-- for example, if typing 'foo' in front of 'bar', 'foobar' is not offered | |
local right = linetx:sub(localpos+1,#linetx):match("^([%a_]+[%w_]*)") | |
if userList and right then | |
- userList = userList:gsub("%f[%w_]"..lt..right.."%f[%W]",""):gsub(" +"," ") | |
+ -- remove all spaces that may be left if "foo" removed from "foo foo" |
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/lualibs/mobdebug/mobdebug.lua b/lualibs/mobdebug/mobdebug.lua | |
index 89d6be4..618f8fb 100644 | |
--- a/lualibs/mobdebug/mobdebug.lua | |
+++ b/lualibs/mobdebug/mobdebug.lua | |
@@ -274,12 +274,22 @@ local function stack(start) | |
local func = debug.getinfo(f, "f").func | |
local i = 1 | |
local locals = {} | |
+ -- get locals | |
while true do |
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
#!/bin/bash | |
INSTALL_PATH=/opt/zbstudio | |
VERSION=$1 | |
echo Installing ZeroBrane Studio $VERSION... | |
if [ -d "$INSTALL_PATH" ]; then | |
if [ -e "$INSTALL_PATH/cfg/user.lua" ]; then |
OlderNewer