Skip to content

fix(renderer): restore tab stops if hard tabs are enabled#1677

Merged
aymanbagabas merged 1 commit intomainfrom
reset-tab-stops
Apr 13, 2026
Merged

fix(renderer): restore tab stops if hard tabs are enabled#1677
aymanbagabas merged 1 commit intomainfrom
reset-tab-stops

Conversation

@aymanbagabas
Copy link
Copy Markdown
Contributor

@aymanbagabas aymanbagabas commented Apr 13, 2026

When hard tabs are enabled, we optimize rendering by using actual tab characters instead of spaces. This requires us to set tab stops every 8 columns at the beginning of the rendering process.

Fixes: #1614
Supersedes: #1647

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.38%. Comparing base (d81b6b6) to head (7fa0685).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
cursed_renderer.go 20.00% 3 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1677      +/-   ##
==========================================
- Coverage   55.72%   55.38%   -0.35%     
==========================================
  Files          25       25              
  Lines        1301     1309       +8     
==========================================
  Hits          725      725              
- Misses        490      493       +3     
- Partials       86       91       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

When hard tabs are enabled, we optimize rendering by using actual tab
characters instead of spaces. This requires us to set tab stops every 8
columns at the beginning of the rendering process.

Fixes: #1614
@aymanbagabas aymanbagabas merged commit ac355fe into main Apr 13, 2026
40 checks passed
@aymanbagabas aymanbagabas deleted the reset-tab-stops branch April 13, 2026 14:28
dgalanberasaluce pushed a commit to dgalanberasaluce/maximus-cli that referenced this pull request Apr 30, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [charm.land/bubbles/v2](https://github.com/charmbracelet/bubbles) | `v2.0.0` → `v2.1.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/charm.land%2fbubbles%2fv2/v2.1.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/charm.land%2fbubbles%2fv2/v2.0.0/v2.1.0?slim=true) |
| [charm.land/bubbletea/v2](https://github.com/charmbracelet/bubbletea) | `v2.0.2` → `v2.0.6` | ![age](https://developer.mend.io/api/mc/badges/age/go/charm.land%2fbubbletea%2fv2/v2.0.6?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/charm.land%2fbubbletea%2fv2/v2.0.2/v2.0.6?slim=true) |
| [charm.land/lipgloss/v2](https://github.com/charmbracelet/lipgloss) | `v2.0.2` → `v2.0.3` | ![age](https://developer.mend.io/api/mc/badges/age/go/charm.land%2flipgloss%2fv2/v2.0.3?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/charm.land%2flipgloss%2fv2/v2.0.2/v2.0.3?slim=true) |
| [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) | `v1.14.37` → `v1.14.44` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fmattn%2fgo-sqlite3/v1.14.44?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fmattn%2fgo-sqlite3/v1.14.37/v1.14.44?slim=true) |

---

### Release Notes

<details>
<summary>charmbracelet/bubbles (charm.land/bubbles/v2)</summary>

### [`v2.1.0`](https://github.com/charmbracelet/bubbles/releases/tag/v2.1.0)

[Compare Source](charmbracelet/bubbles@v2.0.0...v2.1.0)

### Shrink ’n’ grow your textareas

The update adds a new feature to automatically resize your `textarea` vertically as its content changes.

```go
ta := textarea.New()
ta.DynamicHeight = true   // Enable dynamic resizing
ta.MinHeight = 3          // Minimum visible rows
ta.MaxHeight = 10         // Maximum visible rows
ta.MaxContentHeight = 20  // Maximum rows of content
```

Piece of cake, right?

<p><img width="500" src="https://github.com/user-attachments/assets/6f990de7-833d-4742-b3de-c87ffff8b77e" /></p>

Enjoy! 💘

#### Changelog

##### New!

- [`f1daacf`](charmbracelet/bubbles@f1daacf): feat(textarea): dynamic height ([#&#8203;910](charmbracelet/bubbles#910)) ([@&#8203;meowgorithm](https://github.com/meowgorithm))

***

<a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a>

Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@&#8203;charmcli), [Bluesky](https://bsky.app/profile/charm.land).

</details>

<details>
<summary>charmbracelet/bubbletea (charm.land/bubbletea/v2)</summary>

### [`v2.0.6`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.6)

[Compare Source](charmbracelet/bubbletea@v2.0.5...v2.0.6)

This release fixes an issue with how Bubble Tea handled wide characters. Before, a wide character might be skipped or cause an infinite loop causing the CPU to spike. See [`fdcd0cf`](charmbracelet/bubbletea@fdcd0cf) and [charmbracelet/ultraviolet#109](charmbracelet/ultraviolet#109) for more details.

***

<a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a>

Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@&#8203;charmcli), [Bluesky](https://bsky.app/profile/charm.land).

### [`v2.0.5`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.5)

[Compare Source](charmbracelet/bubbletea@v2.0.4...v2.0.5)

A small release to remove accidental unwanted debug log file. See [`1ed724a`](charmbracelet/bubbletea@1ed724a) and [charmbracelet/ultraviolet@`b516641`](charmbracelet/ultraviolet@b516641) for details.

***

<a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a>

Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@&#8203;charmcli), [Bluesky](https://bsky.app/profile/charm.land).

### [`v2.0.4`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.4)

[Compare Source](charmbracelet/bubbletea@v2.0.3...v2.0.4)

This release includes a small fix related to width calculation in [x/ansi](https://github.com/charmbracelet/x/tree/main/ansi). See [`c788fe9`](charmbracelet/bubbletea@c788fe9) and [charmbracelet/x@`6921c75`](charmbracelet/x@6921c75) for more details.

***

<a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a>

Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@&#8203;charmcli), [Bluesky](https://bsky.app/profile/charm.land).

### [`v2.0.3`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.3)

[Compare Source](charmbracelet/bubbletea@v2.0.2...v2.0.3)

### Extra Extra Extended Keyboard Enhancements!

This release adds support for the full set of Keyboard Enhancements. Now you can enable any enhancements on top of the default disambiguate one.

```go
func (m model) View() tea.View {
  var v tea.View
  v.KeyboardEnhancements.ReportAlternateKeys = true
  v.KeyboardEnhancements.ReportAllKeysAsEscapeCodes = true
  return v
}
```

### Smarter Renderer

We also fixed a few renderer related bugs and made the Cursed Renderer smarter. Now, we always reset the terminal tab stops for the Bubble Tea program process context. People using `tabs -N` in their shell profiles shouldn't be affected.

See the full changelog below.

#### Changelog

##### New!

- [`05df5ae`](charmbracelet/bubbletea@05df5ae): feat: support extended keyboard enhancements ([#&#8203;1626](charmbracelet/bubbletea#1626)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas))

##### Fixed

- [`a3d7807`](charmbracelet/bubbletea@a3d7807): fix(ci): only run build-examples on non-dependabot PRs ([@&#8203;aymanbagabas](https://github.com/aymanbagabas))
- [`7df1e65`](charmbracelet/bubbletea@7df1e65): fix(examples): migrate imports to charm.land for the glamour example ([#&#8203;1642](charmbracelet/bubbletea#1642)) ([@&#8203;mhdna](https://github.com/mhdna))
- [`ee06e98`](charmbracelet/bubbletea@ee06e98): fix(examples): resolve nil pointer dereference ([#&#8203;1663](charmbracelet/bubbletea#1663)) ([@&#8203;mattpcaswell](https://github.com/mattpcaswell))
- [`ac355fe`](charmbracelet/bubbletea@ac355fe): fix(renderer): restore tab stops if hard tabs are enabled ([#&#8203;1677](charmbracelet/bubbletea#1677)) ([@&#8203;aymanbagabas](https://github.com/aymanbagabas))
- [`729f05c`](charmbracelet/bubbletea@729f05c): fix: add missing signal.Stop in suspendProcess to prevent signal channel leak (Closes [#&#8203;1673](charmbracelet/bubbletea#1673)) ([#&#8203;1674](charmbracelet/bubbletea#1674)) ([@&#8203;kuishou68](https://github.com/kuishou68))

##### Docs

- [`bbe4faf`](charmbracelet/bubbletea@bbe4faf): docs(example): add textarea dynamic height example ([#&#8203;1639](charmbracelet/bubbletea#1639)) ([@&#8203;meowgorithm](https://github.com/meowgorithm))
- [`e19d255`](charmbracelet/bubbletea@e19d255): docs: fix README wording ([#&#8203;1624](charmbracelet/bubbletea#1624)) ([@&#8203;Rohan5commit](https://github.com/Rohan5commit))

##### Other stuff

- [`65c3978`](charmbracelet/bubbletea@65c3978): ci: sync golangci-lint config ([#&#8203;1556](charmbracelet/bubbletea#1556)) ([@&#8203;github-actions](https://github.com/github-actions)\[bot])

***

<a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a>

Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@&#8203;charmcli), [Bluesky](https://bsky.app/profile/charm.land).

</details>

<details>
<summary>charmbracelet/lipgloss (charm.land/lipgloss/v2)</summary>

### [`v2.0.3`](https://github.com/charmbracelet/lipgloss/releases/tag/v2.0.3)

[Compare Source](charmbracelet/lipgloss@v2.0.2...v2.0.3)

#### Changelog

##### Fixed

- [`472d718`](charmbracelet/lipgloss@472d718): fix: Avoid background color query hang ([#&#8203;636](charmbracelet/lipgloss#636)) ([@&#8203;jedevc](https://github.com/jedevc))

##### Docs

- [`9e39a0a`](charmbracelet/lipgloss@9e39a0a): docs: fix README typo ([#&#8203;629](charmbracelet/lipgloss#629)) ([@&#8203;Rohan5commit](https://github.com/Rohan5commit))
- [`cd93a9f`](charmbracelet/lipgloss@cd93a9f): docs: fix tree comment typo ([#&#8203;634](charmbracelet/lipgloss#634)) ([@&#8203;Rohan5commit](https://github.com/Rohan5commit))

***

<a href="https://charm.land/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a>

Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@&#8203;charmcli), [Bluesky](https://bsky.app/profile/charm.land).

</details>

<details>
<summary>mattn/go-sqlite3 (github.com/mattn/go-sqlite3)</summary>

### [`v1.14.44`](mattn/go-sqlite3@v1.14.43...v1.14.44)

[Compare Source](mattn/go-sqlite3@v1.14.43...v1.14.44)

### [`v1.14.43`](mattn/go-sqlite3@v1.14.42...v1.14.43)

[Compare Source](mattn/go-sqlite3@v1.14.42...v1.14.43)

### [`v1.14.42`](mattn/go-sqlite3@v1.14.41...v1.14.42)

[Compare Source](mattn/go-sqlite3@v1.14.41...v1.14.42)

### [`v1.14.41`](mattn/go-sqlite3@v1.14.40...v1.14.41)

[Compare Source](mattn/go-sqlite3@v1.14.40...v1.14.41)

### [`v1.14.40`](mattn/go-sqlite3@v1.14.39...v1.14.40)

[Compare Source](mattn/go-sqlite3@v1.14.39...v1.14.40)

### [`v1.14.39`](mattn/go-sqlite3@v1.14.38...v1.14.39)

[Compare Source](mattn/go-sqlite3@v1.14.38...v1.14.39)

### [`v1.14.38`](mattn/go-sqlite3@v1.14.37...v1.14.38)

[Compare Source](mattn/go-sqlite3@v1.14.37...v1.14.38)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My43My4yIiwidXBkYXRlZEluVmVyIjoiNDMuNzMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://forgejo.internal/forgejo_admin/maximus/pulls/8
Co-authored-by: Renovate Bot <renovatebot@forgejo.internal>
Co-committed-by: Renovate Bot <renovatebot@forgejo.internal>
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.

[v2] Hard-tab cursor optimization silently breaks column alignment in View() output

1 participant