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 redis = { | |
_VERSION = 'redis-lua 2.0.5-dev', | |
_DESCRIPTION = 'A Lua client library for the redis key value storage system.', | |
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri', | |
} | |
-- The following line is used for backwards compatibility in order to keep the `Redis` | |
-- global module name. Using `Redis` is now deprecated so you should explicitly assign | |
-- the module to a local variable when requiring it: `local redis = require('redis')`. | |
Redis = redis |
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 MAXTIME = 5 -- sec | |
local function cgi(cmd, opts) | |
if not cmd or not cmd[1] then error('missing command') end | |
if not opts then opts = {} end | |
local nph = opts.nph | |
local maxtime = opts.maxtime or MAXTIME | |
local env = {} | |
local envu = opts.env or {} | |
local envd = #envu > 0 and envu or { | |
SERVER_ADDR = FormatIp(GetServerAddr()), |
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
#!/usr/bin/lua | |
-- Perl6 example -- | |
--[[ | |
my @xs := gather { | |
my $x = 0; | |
my $y = 1; | |
while True { | |
take $x; |
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
require "wx" | |
-- this is a minimal example | |
local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "Demo", | |
wx.wxDefaultPosition, wx.wxSize(450, 450), wx.wxDEFAULT_FRAME_STYLE ) | |
local e = wxstc.wxStyledTextCtrl(frame, wx.wxID_ANY, | |
wx.wxDefaultPosition, wx.wxSize(0, 0), wx.wxBORDER_STATIC) | |
e:SetText("if true then\n print '1'\nend\n\nfoo(1,\n 2)\n") | |
local margin = { LINENUMBER = 0, MARKER = 1, FOLD = 2 } |
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/build/build-win32.sh b/build/build-win32.sh | |
index 2a6c87ac..4949d199 100644 | |
--- a/build/build-win32.sh | |
+++ b/build/build-win32.sh | |
@@ -316,8 +316,8 @@ if [ $BUILD_WXLUA ]; then | |
cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=$WXLUABUILD -DBUILD_SHARED_LIBS=FALSE \ | |
-DCMAKE_CXX_FLAGS="-DLUA_COMPAT_MODULE" \ | |
-DwxWidgets_CONFIG_EXECUTABLE="$INSTALL_DIR/bin/wx-config" \ | |
- -DwxWidgets_COMPONENTS="stc;gl;html;aui;adv;core;net;base" \ | |
- -DwxLuaBind_COMPONENTS="stc;gl;html;aui;adv;core;net;base" -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE \ |
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/markup.lua b/src/editor/markup.lua | |
index ddb3e208..d137899f 100644 | |
--- a/src/editor/markup.lua | |
+++ b/src/editor/markup.lua | |
@@ -194,6 +194,10 @@ function MarkupStyle(editor, lines, linee) | |
local lsep = w:find(q(MD_MARK_LINZ)..q(MD_MARK_LINA)) | |
if lsep then emark = #w-lsep+#MD_MARK_LINT end | |
end | |
+ local sp = bit.band(editor:GetStyleAt(p-1), ide.STYLEMASK) -- previous position style | |
+ if mark == MD_MARK_HEAD and not iscomment[sp] 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
local https = require "ssl.https" | |
local ltn12 = require "ltn12" | |
local response = {} | |
local r, c, h, s = https.request { | |
url = "https://api.github.com/repos/akbooer/openLuup/contents?ref=master", | |
sink = ltn12.sink.table(response), | |
protocol = "tlsv1_2" | |
} |
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 f92e7f1..5a90fa1 100644 | |
--- a/src/editor/editor.lua | |
+++ b/src/editor/editor.lua | |
@@ -1624,7 +1624,8 @@ local function cleanup(paths) | |
if not FileRemove(path) then wx.wxRmdir(path) end | |
end | |
end | |
-local function setLexLPegLexer(editor, lexername) | |
+local function setLexLPegLexer(editor, spec) |
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/highlightselected.lua b/highlightselected.lua | |
index 14ee4a1..43fa281 100644 | |
--- a/highlightselected.lua | |
+++ b/highlightselected.lua | |
@@ -2,23 +2,30 @@ | |
local updateneeded, cfg | |
local indicname = "highlightselected.selected" | |
+local function onUpdate(event, editor) | |
+ if bit.band(event:GetUpdated(), wxstc.wxSTC_UPDATE_SELECTION) > 0 then updateneeded = 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
diff --git a/src/editor/shellbox.lua b/src/editor/shellbox.lua | |
index 6a9a776..70a29cb 100644 | |
--- a/src/editor/shellbox.lua | |
+++ b/src/editor/shellbox.lua | |
@@ -400,9 +400,10 @@ end | |
local function displayShellIntro() | |
DisplayShellMsg(TR("Welcome to the interactive Lua interpreter.").." " | |
- ..TR("Enter Lua code and press Enter to run it.").."\n" | |
- ..TR("Use Shift-Enter for multiline code.").." " |
NewerOlder