Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/opencode/ui/permission_window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function M.format_display(output)
title = icons.get('warning') .. ' Permission Required' .. progress,
title_hl = 'OpencodePermissionTitle',
border_hl = 'OpencodePermissionBorder',
content = render_content and nil or content,
content = content,
render_content = render_content,
options = options,
unfocused_message = 'Focus Opencode window to respond to permission',
Expand Down
44 changes: 1 addition & 43 deletions lua/opencode/ui/renderer/flush.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ local append = require('opencode.ui.renderer.append')
local M = {}
local warned_part_render_error = false

local pinned_overlay_part_ids = {
['permission-display-part'] = true,
['question-display-part'] = true,
}

local pinned_overlay_message_ids = {
['permission-display-message'] = true,
['question-display-message'] = true,
}

---@param part_id string
---@param message_id string|nil
---@param err any
Expand Down Expand Up @@ -418,39 +408,7 @@ local function apply_pending(pending, render_context)
return false
end

local only_pinned_overlay_updates = true
for _, part_id in ipairs(pending.removed_part_order) do
if pending.removed_parts[part_id] and not pinned_overlay_part_ids[part_id] then
only_pinned_overlay_updates = false
break
end
end
if only_pinned_overlay_updates then
for _, message_id in ipairs(pending.removed_message_order) do
if pending.removed_messages[message_id] and not pinned_overlay_message_ids[message_id] then
only_pinned_overlay_updates = false
break
end
end
end
if only_pinned_overlay_updates then
for _, message_id in ipairs(pending.dirty_message_order) do
if pending.dirty_messages[message_id] and not pinned_overlay_message_ids[message_id] then
only_pinned_overlay_updates = false
break
end
end
end
if only_pinned_overlay_updates then
for _, part_id in ipairs(pending.dirty_part_order) do
if pending.dirty_parts[part_id] and not pinned_overlay_part_ids[part_id] then
only_pinned_overlay_updates = false
break
end
end
end

local scroll_snapshot = only_pinned_overlay_updates and nil or scroll.pre_flush(buf)
local scroll_snapshot = scroll.pre_flush(buf)
with_suppressed_output_autocmds(function()
for _, part_id in ipairs(pending.removed_part_order) do
if pending.removed_parts[part_id] then
Expand Down
Loading