Skip to content

Commit

Permalink
Start testing in Windows #194
Browse files Browse the repository at this point in the history
  • Loading branch information
sakhnik committed Aug 1, 2023
1 parent 77a9756 commit 1520503
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/proxy/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ function Proxy:process_command()
self.request_timer:stop()
self:send_response(req_id, "Timed out", addr)
self.current_request = nil
self:on_stdout(self.buffer)
self.buffer = nil
if self.buffer ~= nil then
self:on_stdout(self.buffer, '')
self.buffer = nil
end
self:process_command()
end))
end
Expand Down
2 changes: 1 addition & 1 deletion lib/proxy/pdb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ package.path = dir .. '/?.lua;' .. package.path

local Proxy = require'base'

local proxy = Proxy.new('[\n\r]%(Pdb%+*%) ')
local proxy = Proxy.new('[\n\r]%(Pdb%+*%) *')
proxy:start()
vim.wait(10^9, function() return false end)
6 changes: 5 additions & 1 deletion lua/nvimgdb/backend/pdb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ end
---@return string[] command to launch the debugger with termopen()
function C.get_launch_cmd(client_cmd, tmp_dir, proxy_addr)
local _ = tmp_dir
local cmd = {'nvim', '--clean', '-u', 'NONE', '-l', utils.get_plugin_file_path('lib', 'proxy', 'pdb.lua'), '-a', proxy_addr}
local cmd = {
utils.is_windows and 'nvim.exe' or 'nvim', '--clean', '-u', 'NONE',
'-l', utils.get_plugin_file_path('lib', 'proxy', 'pdb.lua'),
'-a', proxy_addr
}
-- Append the rest of arguments
for i = 1, #client_cmd do
cmd[#cmd + 1] = client_cmd[i]
Expand Down

0 comments on commit 1520503

Please sign in to comment.