Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
sakhnik committed Oct 14, 2023
2 parents 69d055a + f300677 commit c0328e2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lua/nvimgdb/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ end
---Execute a custom debugger command and return its output.
---@deprecated
---@param cmd string debugger command to execute
---@return string fetched debugger output
---@return string? fetched debugger output
function App:custom_command(cmd)
log.debug({"App:custom_command", cmd = cmd})
local done = false
Expand Down
6 changes: 6 additions & 0 deletions lua/nvimgdb/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ function Client:get_client_buf()
return self.client_buf
end

---Return true if the client is active
---@return boolean
function Client:get_is_active()
return self.is_active
end

function Client:_cleanup_buf_hidden()
log.debug({"Client:_cleanup_buf_hidden"})
if self.buf_hidden_auid ~= -1 then
Expand Down
2 changes: 1 addition & 1 deletion lua/nvimgdb/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ do
end
end
get_logfile():write(table.concat(parts, '\t'), "\n")
logfile:flush()
get_logfile():flush()
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lua/nvimgdb/parser_impl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local log = require'nvimgdb.log'
---@field private buffer string debugger output collected so far
---@field private byte_count number monotonously increasing processed byte counter
---@field private parsing_progress number[] ordered byte counters to ensure parsing in the right order
---@field private timers table<userdata, boolean> scheduled timers
---@field private timers table<unknown, boolean> scheduled timers
---@field private output_is_still boolean true if no new output when parsing is delayed
local ParserImpl = {}
ParserImpl.__index = ParserImpl
Expand Down
2 changes: 1 addition & 1 deletion lua/nvimgdb/proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ end
function Proxy:query(request)
log.info({"Proxy:query", request = request})

if not self.client.is_active then
if not self.client:get_is_active() then
return nil
end

Expand Down
6 changes: 3 additions & 3 deletions lua/nvimgdb/win.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local log = require'nvimgdb.log'
---@field private cursor Cursor current line sign manager
---@field private client Client debugger terminal job
---@field private breakpoint Breakpoint breakpoint sign manager
---@field private jump_win number window handle that will be displaying the current file
---@field private jump_win number? window handle that will be displaying the current file
---@field private buffers table<number,boolean> set of opened buffers to close automatically
local Win = {}
Win.__index = Win
Expand All @@ -20,8 +20,8 @@ Win.__index = Win
---@param cursor Cursor current line sign manager
---@param client Client debugger terminal job
---@param breakpoint Breakpoint breakpoint sign manager
---@param start_win number window handle that could be used as the jump window
---@param edited_buf number buffer handle that needs to be loaded by default
---@param start_win number? window handle that could be used as the jump window
---@param edited_buf number? buffer handle that needs to be loaded by default
---@return Win new instance
function Win.new(config, keymaps, cursor, client, breakpoint, start_win, edited_buf)
log.debug({"Win.new", start_win = start_win, edited_buf = edited_buf})
Expand Down

0 comments on commit c0328e2

Please sign in to comment.