Small bug fixes (#298)

fix: List remote branches for merge targets (#293)
fix: consider remote branches (#297)
fix: Save popup contents to temp_registers (#294) 

This is a #PATCH release.
This commit is contained in:
Harrison (Harry) Cramer
2024-05-05 11:12:39 -04:00
committed by GitHub
parent 0d0ed1639a
commit 816b87cf91
5 changed files with 21 additions and 14 deletions

View File

@@ -188,28 +188,23 @@ M.create_comment_layout = function(opts)
},
}, internal_layout)
local popup_opts = {
action_before_close = true,
action_before_exit = false,
}
miscellaneous.set_cycle_popups_keymaps({ M.comment_popup, M.draft_popup })
local range = opts.ranged and { start_line = M.start_line, end_line = M.end_line } or nil
local unlinked = opts.unlinked or false
---Keybinding for focus on text section
---Keybinding for focus on draft section
state.set_popup_keymaps(M.draft_popup, function()
local text = u.get_buffer_text(M.comment_popup.bufnr)
confirm_create_comment(text, range, unlinked, opts.discussion_id)
vim.api.nvim_set_current_win(M.current_win)
end, miscellaneous.toggle_bool, popup_opts)
end, miscellaneous.toggle_bool, miscellaneous.non_editable_popup_opts)
---Keybinding for focus on draft section
---Keybinding for focus on text section
state.set_popup_keymaps(M.comment_popup, function(text)
confirm_create_comment(text, range, unlinked, opts.discussion_id)
vim.api.nvim_set_current_win(M.current_win)
end, miscellaneous.attach_file, popup_opts)
end, miscellaneous.attach_file, miscellaneous.editable_popup_opts)
vim.schedule(function()
local draft_mode = state.settings.discussion_tree.draft_mode