# Fix spurious bell from oversized OSC and duplicate CLI attach output \(\#80\) · lucenx/signaltty

[View on GitCafe](https://git.cafe/lucenx/signaltty/commit/43eef479915e1aa4c5f85a3dbc420f5d94944bdb)

Repository: [lucenx/signaltty](https://git.cafe/lucenx/signaltty)

Visibility: public

Requested revision: 43eef479915e1aa4c5f85a3dbc420f5d94944bdb

Requested commit: 43eef479915e1aa4c5f85a3dbc420f5d94944bdb

Commit: 43eef479915e1aa4c5f85a3dbc420f5d94944bdb

Tree: da22a1c002969ef2429588282fcef7e871a63102

Author: Simone

Committer: GitHub

## Message

```
Fix spurious bell from oversized OSC and duplicate CLI attach output (#80)

* term: keep oversized OSC terminators from raising a bell

An OSC longer than the 8 KiB carry buffer (OSC 52 clipboard writes,
inline images) was dropped mid-sequence, so its BEL terminator was then
scanned as a bare bell and marked the pane Unread. Skip the rest of a
dropped OSC through its terminator instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cli: drop attach output the snapshot already covers

The server registers a viewer before taking the attach snapshot, so a
chunk streamed meanwhile arrives after the response although the
snapshot already contains it. The GUI trims by `output_offset`; the CLI
wrote it twice. Trim the covered prefix the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
```

## Parents

- [7aabedd83f86e05f377f34161e7851003e9ccbaf](https://git.cafe/lucenx/signaltty/commit/7aabedd83f86e05f377f34161e7851003e9ccbaf?format=markdown)

[Source at this commit](https://git.cafe/lucenx/signaltty/tree/43eef479915e1aa4c5f85a3dbc420f5d94944bdb?format=markdown)
