[PR #160] [MERGED] The text widget can now wrap its content at word boundaries. #228

Closed
opened 2026-03-03 16:23:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mum4k/termdash/pull/160
Author: @mum4k
Created: 3/2/2019
Status: Merged
Merged: 3/2/2019
Merged by: @mum4k

Base: develHead: word-wrap


📝 Commits (6)

  • 54c5dff Factoring the line wrapping logic out of the text widget.
  • 61aca3f Removing Text's dependency on wrap.Needed.
  • 87cab66 Simplifying the text widget.
  • f102632 Implementing AtWords wrapping mode.
  • c43e453 Text validation moved to the wrap package.
  • 2742487 The text widget now wraps at words.

📊 Changes

14 files changed (+1334 additions, -549 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 doc/images/textdemo.gif (+0 -0)
📝 internal/canvas/buffer/buffer.go (+14 -0)
📝 internal/canvas/buffer/buffer_test.go (+53 -6)
internal/wrap/wrap.go (+409 -0)
internal/wrap/wrap_test.go (+743 -0)
widgets/text/line_scanner.go (+0 -143)
widgets/text/line_scanner_test.go (+0 -287)
📝 widgets/text/line_trim.go (+2 -1)
📝 widgets/text/line_trim_test.go (+13 -12)
📝 widgets/text/options.go (+12 -2)
📝 widgets/text/text.go (+40 -95)
📝 widgets/text/text_test.go (+45 -1)
📝 widgets/text/textdemo/textdemo.go (+2 -2)

📄 Description

Fixes #30


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mum4k/termdash/pull/160 **Author:** [@mum4k](https://github.com/mum4k) **Created:** 3/2/2019 **Status:** ✅ Merged **Merged:** 3/2/2019 **Merged by:** [@mum4k](https://github.com/mum4k) **Base:** `devel` ← **Head:** `word-wrap` --- ### 📝 Commits (6) - [`54c5dff`](https://github.com/mum4k/termdash/commit/54c5dff63e3f60c83b34405ef46aa66c21b55ac9) Factoring the line wrapping logic out of the text widget. - [`61aca3f`](https://github.com/mum4k/termdash/commit/61aca3fb6210ee59ca757e9f082841c564acda35) Removing Text's dependency on wrap.Needed. - [`87cab66`](https://github.com/mum4k/termdash/commit/87cab66617798c6260bfcf45e2dedf987d3b0382) Simplifying the text widget. - [`f102632`](https://github.com/mum4k/termdash/commit/f102632bd4ac766ecd113092d1c95e278e803cd1) Implementing AtWords wrapping mode. - [`c43e453`](https://github.com/mum4k/termdash/commit/c43e4530380b3a6a191ddd76224de85d540d8244) Text validation moved to the wrap package. - [`2742487`](https://github.com/mum4k/termdash/commit/2742487fc0e85f96f5716b4d2c640d3b9aa62f48) The text widget now wraps at words. ### 📊 Changes **14 files changed** (+1334 additions, -549 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `doc/images/textdemo.gif` (+0 -0) 📝 `internal/canvas/buffer/buffer.go` (+14 -0) 📝 `internal/canvas/buffer/buffer_test.go` (+53 -6) ➕ `internal/wrap/wrap.go` (+409 -0) ➕ `internal/wrap/wrap_test.go` (+743 -0) ➖ `widgets/text/line_scanner.go` (+0 -143) ➖ `widgets/text/line_scanner_test.go` (+0 -287) 📝 `widgets/text/line_trim.go` (+2 -1) 📝 `widgets/text/line_trim_test.go` (+13 -12) 📝 `widgets/text/options.go` (+12 -2) 📝 `widgets/text/text.go` (+40 -95) 📝 `widgets/text/text_test.go` (+45 -1) 📝 `widgets/text/textdemo/textdemo.go` (+2 -2) </details> ### 📄 Description Fixes #30 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:23:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termdash#228
No description provided.