Lua_GetProjectPath, SDLK_Period
This commit is contained in:
@@ -401,42 +401,6 @@ function ApplyRules(s)
|
||||
return nil
|
||||
end
|
||||
|
||||
function IsWhitespace(w)
|
||||
local result = w == string.byte('\n') or
|
||||
w == string.byte(' ') or
|
||||
w == string.byte('\t') or
|
||||
w == string.byte('\v') or
|
||||
w == string.byte('\r')
|
||||
return result
|
||||
end
|
||||
|
||||
function IsSymbol(w)
|
||||
local result = (w >= string.byte('!') and w <= string.byte('/')) or
|
||||
(w >= string.byte(':') and w <= string.byte('@')) or
|
||||
(w >= string.byte('[') and w <= string.byte('`')) or
|
||||
(w >= string.byte('{') and w <= string.byte('~'))
|
||||
return result
|
||||
end
|
||||
|
||||
function IsLoadWord(w)
|
||||
local result = w == string.byte('(') or
|
||||
w == string.byte(')') or
|
||||
w == string.byte('/') or
|
||||
w == string.byte('\\') or
|
||||
w == string.byte(':') or
|
||||
w == string.byte('+') or
|
||||
w == string.byte('_') or
|
||||
w == string.byte('.') or
|
||||
w == string.byte('-') or
|
||||
w == string.byte(',') or
|
||||
w == string.byte('"') or
|
||||
w == string.byte("'")
|
||||
if not result then
|
||||
result = not (IsSymbol(w) or IsWhitespace(w))
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
Coroutines = {}
|
||||
function AddCo(f)
|
||||
local i = #Coroutines + 1
|
||||
@@ -463,8 +427,6 @@ table.insert(OnCommandCallbacks, function (e)
|
||||
C("git grep -n "..GetLoadWord().." :/") end
|
||||
if e.key == SDLK_L and e.ctrl == 1 then
|
||||
Eval(GetLoadWord()) end
|
||||
if e.key == SDLK_B and e.ctrl == 1 then
|
||||
C(GetLoadWord()) end
|
||||
end)
|
||||
|
||||
-- REMEBER: AS LITTLE ACTUAL CODE AS POSSIBLE IN LUA
|
||||
|
||||
Reference in New Issue
Block a user