Fuzzy search, working dir as nullbuffer dir
This commit is contained in:
@@ -175,7 +175,7 @@ function MatchWindowsPath(_s)
|
||||
end
|
||||
|
||||
if not drive then
|
||||
local d = GetDir()
|
||||
local d = GetMainDir()
|
||||
file_path = d..'/'..file_path
|
||||
end
|
||||
local line, col, s = SkipLineAndColumn(s)
|
||||
@@ -191,7 +191,7 @@ function MatchGitCommit(s)
|
||||
if i then
|
||||
s = s:sub(8)
|
||||
local command = "git --no-pager show "..s
|
||||
return {kind = "exec", cmd = command, working_dir = GetDir()}
|
||||
return {kind = "exec", cmd = command, working_dir = GetMainDir()}
|
||||
end
|
||||
return nil
|
||||
end
|
||||
@@ -199,7 +199,7 @@ end
|
||||
function MatchURL(s)
|
||||
local i, j = string.find(s, "^https://")
|
||||
if i then
|
||||
return {kind = "exec_console", cmd = '"'..INTERNET_BROWSER..'" '..s, working_dir = GetDir()}
|
||||
return {kind = "exec_console", cmd = '"'..INTERNET_BROWSER..'" '..s, working_dir = GetMainDir()}
|
||||
end
|
||||
return nil
|
||||
end
|
||||
@@ -222,7 +222,7 @@ function ApplyRules(s)
|
||||
end
|
||||
|
||||
function CFiles()
|
||||
Cmd({working_dir = GetProjectPath(), destination ="a", cmd = "dir /s/b | findstr .*\\.c"})
|
||||
Cmd({working_dir = GetProjectDir(), kind ="a", cmd = "dir /s/b | findstr .*\\.c"})
|
||||
end
|
||||
|
||||
Coroutines = {}
|
||||
@@ -238,7 +238,7 @@ table.insert(OnCommandCallbacks, function (e)
|
||||
if e.key == SDLK_F and e.ctrl == 1 and e.shift == 1 then
|
||||
C("git grep -n "..GetLoadWord().." :/") end
|
||||
if e.key == SDLK_B and e.ctrl == 1 then
|
||||
Cmd { working_dir = GetProjectPath(), destination = "console", cmd = "build.bat" } end
|
||||
Cmd { working_dir = GetProjectDir(), kind = "console", cmd = "build.bat" } end
|
||||
end)
|
||||
|
||||
function OnUpdate(e)
|
||||
|
||||
Reference in New Issue
Block a user