refactor: one render/clear pair for bookmark visuals #129

Open
noe.trevino wants to merge 7 commits from feature-108/render-helper into feature-108/visual-selection-annotations
Owner

Stacked on #128. Retarget to the umbrella (#127) once #128 merges.

  • add render_bookmark/clear_bookmark and render_note/clear_note to display

  • api create, delete, clear and rollbacks use them

  • api note paths (annotate, toggle, toggle all, resize) use them

  • restoration calls render_bookmark directly; a failed render counts as a failure

  • notes draw on the synced bookmark line (drops the extra line param)

  • fix: reopening a buffer no longer deletes another bookmark's note through stale extmark ids (this one predates the stack)

  • no drawing code left outside display.lua

  • tests pass (575)

  • retarget to the umbrella after #128

Refs #108

Stacked on #128. Retarget to the umbrella (#127) once #128 merges. - add `render_bookmark`/`clear_bookmark` and `render_note`/`clear_note` to display - api create, delete, clear and rollbacks use them - api note paths (annotate, toggle, toggle all, resize) use them - restoration calls `render_bookmark` directly; a failed render counts as a failure - notes draw on the synced bookmark line (drops the extra `line` param) - fix: reopening a buffer no longer deletes another bookmark's note through stale extmark ids (this one predates the stack) - [x] no drawing code left outside `display.lua` - [x] tests pass (575) - [ ] retarget to the umbrella after #128 Refs #108
- add render_bookmark/clear_bookmark for the mark, sign and note
- add render_note/clear_note for the note alone
- reset extmark IDs on the bookmark when clearing

Refs #108
- create, delete, clear and clear_all use render_bookmark/clear_bookmark
- delete rollbacks re-render with render_bookmark
- drop cleanup_bookmark_visuals and recreate_bookmark_visuals

Refs #108
- annotate, toggle, toggle_all_lines and refresh_above_annotations use render_note/clear_note
- a failed redraw now clears the note ID instead of keeping a stale one

Refs #108
refactor(restoration): restore bookmarks with render_bookmark
All checks were successful
Auto Assign / assign (pull_request_target) Successful in 1s
CI / Check for debug messages (pull_request) Successful in 3s
CI / config (pull_request) Successful in 4s
CI / stylua (pull_request) Successful in 6s
CI / tests (pull_request) Successful in 18s
CI / docs (pull_request) Has been skipped
CI / release (pull_request) Has been skipped
CI / ci (pull_request) Successful in 0s
5282c2445d
- replace the hand-rolled mark, sign and note drawing with render_bookmark

Refs #108
noe.trevino force-pushed feature-108/render-helper from 5282c2445d
All checks were successful
Auto Assign / assign (pull_request_target) Successful in 1s
CI / Check for debug messages (pull_request) Successful in 3s
CI / config (pull_request) Successful in 4s
CI / stylua (pull_request) Successful in 6s
CI / tests (pull_request) Successful in 18s
CI / docs (pull_request) Has been skipped
CI / release (pull_request) Has been skipped
CI / ci (pull_request) Successful in 0s
to 7aa011b67c
All checks were successful
CI / config (pull_request) Successful in 5s
CI / stylua (pull_request) Successful in 4s
CI / Check for debug messages (pull_request) Successful in 3s
CI / tests (pull_request) Successful in 17s
CI / docs (pull_request) Has been skipped
CI / release (pull_request) Has been skipped
CI / ci (pull_request) Successful in 0s
2026-10-13 17:34:36 -05:00
Compare
noe.trevino changed target branch from feature-108/range-persistence to feature-108/visual-selection-annotations 2026-10-13 19:06:32 -05:00
All checks were successful
CI / config (pull_request) Successful in 5s
CI / stylua (pull_request) Successful in 4s
CI / Check for debug messages (pull_request) Successful in 3s
CI / tests (pull_request) Successful in 17s
CI / docs (pull_request) Has been skipped
CI / release (pull_request) Has been skipped
CI / ci (pull_request) Successful in 0s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature-108/render-helper:feature-108/render-helper
git switch feature-108/render-helper

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch feature-108/visual-selection-annotations
git merge --no-ff feature-108/render-helper
git switch feature-108/render-helper
git rebase feature-108/visual-selection-annotations
git switch feature-108/visual-selection-annotations
git merge --ff-only feature-108/render-helper
git switch feature-108/render-helper
git rebase feature-108/visual-selection-annotations
git switch feature-108/visual-selection-annotations
git merge --no-ff feature-108/render-helper
git switch feature-108/visual-selection-annotations
git merge --squash feature-108/render-helper
git switch feature-108/visual-selection-annotations
git merge --ff-only feature-108/render-helper
git switch feature-108/visual-selection-annotations
git merge feature-108/render-helper
git push origin feature-108/visual-selection-annotations
Sign in to join this conversation.
No description provided.