Skip to content

fix(layout): refresh inline diff during insert-mode edits#122

Merged
dlyongemallo merged 1 commit intomainfrom
debouce_inline_diff_edit
Apr 18, 2026
Merged

fix(layout): refresh inline diff during insert-mode edits#122
dlyongemallo merged 1 commit intomainfrom
debouce_inline_diff_edit

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

Add a debounced TextChangedI autocmd so per-keystroke edits coalesce into a single repaint instead of waiting for InsertLeave.

Copilot AI review requested due to automatic review settings April 18, 2026 07:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds insert-mode inline-diff refreshes for the diff1_inline layout by wiring a debounced TextChangedI autocmd, so inline extmark rendering updates during typing rather than only after leaving insert mode.

Changes:

  • Require diffview.debounce and introduce an insert-mode repaint debounce constant.
  • Add a trailing-edge debounced _repaint handler and a TextChangedI autocmd to invoke it.
  • Ensure debounce timer cleanup occurs when switching buffers and during teardown_render().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/scene/layouts/diff_1_inline.lua
Comment thread lua/diffview/scene/layouts/diff_1_inline.lua
Add a debounced `TextChangedI` autocmd so per-keystroke edits coalesce
into a single repaint instead of waiting for `InsertLeave`.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dlyongemallo dlyongemallo merged commit 4a21fdc into main Apr 18, 2026
6 checks passed
@dlyongemallo dlyongemallo deleted the debouce_inline_diff_edit branch April 18, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants