Skip to content

Refactor/range slice unification#80

Merged
kibi2 merged 4 commits into
mainfrom
refactor/range-slice-unification
May 23, 2026
Merged

Refactor/range slice unification#80
kibi2 merged 4 commits into
mainfrom
refactor/range-slice-unification

Conversation

@kibi2

@kibi2 kibi2 commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Unify range slicing logic shared by Range[] and Attr[].

Changes

  • Added generic range access utility:

    • Range.get_range(item)
  • Shared slice implementation for:

    • Range[]
    • Attr[]
  • Removed need for metatable-based method dispatch

  • Kept data structures serializable and deepcopy-safe

Motivation

Tirenvi frequently stores internal state in:

  • buffer-local variables
  • extmarks
  • serialized cache structures

Metatable methods may be lost during serialization or msgpack conversion.

This change keeps range-related objects as plain Lua tables while still allowing shared range operations.

@codecov

codecov Bot commented May 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kibi2 kibi2 force-pushed the refactor/range-slice-unification branch from 1d02e3a to 7482c39 Compare May 23, 2026 04:41
@kibi2 kibi2 merged commit bf60424 into main May 23, 2026
3 checks passed
@kibi2 kibi2 deleted the refactor/range-slice-unification branch May 23, 2026 04:47
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.

1 participant