Skip to content

Make cellDimension, CellDimension, and BufferLine.isWrapped public#475

Open
MehdiG44 wants to merge 1 commit intomigueldeicaza:mainfrom
MehdiG44:public-accessors
Open

Make cellDimension, CellDimension, and BufferLine.isWrapped public#475
MehdiG44 wants to merge 1 commit intomigueldeicaza:mainfrom
MehdiG44:public-accessors

Conversation

@MehdiG44
Copy link
Contributor

Summary

Makes three properties public so embedding apps can implement tap-to-open-URL and other position-aware features:

  • TerminalView.cellDimension (iOSTerminalView.swift) — needed to convert tap coordinates to terminal rows/columns
  • CellDimension typealias (AppleTerminalView.swift) — required because cellDimension's type must also be public
  • BufferLine.isWrapped (BufferLine.swift) — needed to distinguish soft-wrapped lines from hard newlines

Motivation

Terminal apps commonly need to detect URLs under a user's tap. This requires:

  1. Converting a UIKit tap point to a terminal row (needs cellDimension)
  2. Joining soft-wrapped lines to reconstruct full URLs (needs isWrapped)

These are read-only access patterns — no behavior changes, no API surface increase beyond visibility.

Changes

Three internalpublic visibility changes. No logic changes, no new API.

… public

These properties are needed by consumers for:
- cellDimension: Converting tap coordinates to terminal row/column
- isWrapped: Detecting soft-wrapped lines for URL detection across line breaks

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@migueldeicaza
Copy link
Owner

I have been working on proper URL handling, both auto-detected and properly annotated URLs.

Would you mind checking my branch dingus and tell me if that is sufficient for your needs or what we could do to adjust it?

The reason is that once these things become public, they limit what I can do internally without breaking people.

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