[PR #33] [MERGED] [2/5] Defining options for text written to the widget. #168

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

📋 Pull Request Information

Original PR: https://github.com/mum4k/termdash/pull/33
Author: @mum4k
Created: 5/14/2018
Status: Merged
Merged: 5/27/2018
Merged by: @mum4k

Base: text-widget/1/widget-optionsHead: text-widget/2/write-options


📝 Commits (10+)

  • e786777 Defining options for text written to the widget.
  • 7d14d22 Adding line scanner.
  • 4c54b8a Adding an object that tracks the scrolling state.
  • d6c153f Implementing the text widget.
  • bb73338 Merge branch 'text-widget/1/widget-options' into text-widget/2/write-options
  • 6b39bab Merge branch 'text-widget/2/write-options' into text-widget/3/line-scanner
  • a13c1f6 Merge branch 'text-widget/3/line-scanner' into text-widget/4/scroll-tracker
  • 8df67c6 Merge branch 'text-widget/4/scroll-tracker' into text-widget/5/widget
  • d0ca7ec Merge branch 'text-widget/1/widget-options' into text-widget/2/write-options
  • a3dfd1a Adding licence.

📊 Changes

9 files changed (+2365 additions, -0 deletions)

View changed files

widgets/text/demo/textdemo.go (+161 -0)
widgets/text/line_scanner.go (+142 -0)
widgets/text/line_scanner_test.go (+234 -0)
widgets/text/scroll.go (+165 -0)
widgets/text/scroll_test.go (+332 -0)
widgets/text/text.go (+282 -0)
widgets/text/text_test.go (+718 -0)
widgets/text/write_options.go (+117 -0)
widgets/text/write_options_test.go (+214 -0)

📄 Description

Each set of options applies to a range of characters equal to the length
of the text added.

E.g. on write calls like:
Write("text", opts1)
Write("long text", opts2)

The two passed options will be stored as:
opts1 for byte range low:0, high:4
opts2 for byte range low:4, high:13

The text itself will be stored in a bytes.Buffer.

Works on #4


🔄 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/33 **Author:** [@mum4k](https://github.com/mum4k) **Created:** 5/14/2018 **Status:** ✅ Merged **Merged:** 5/27/2018 **Merged by:** [@mum4k](https://github.com/mum4k) **Base:** `text-widget/1/widget-options` ← **Head:** `text-widget/2/write-options` --- ### 📝 Commits (10+) - [`e786777`](https://github.com/mum4k/termdash/commit/e7867774105fc00e1c27cb4464a8282ec64f2359) Defining options for text written to the widget. - [`7d14d22`](https://github.com/mum4k/termdash/commit/7d14d2219fa488fbf662dd39103d900656bc6d6e) Adding line scanner. - [`4c54b8a`](https://github.com/mum4k/termdash/commit/4c54b8a46ef51c1bbf1a43dbebe842d6311638b9) Adding an object that tracks the scrolling state. - [`d6c153f`](https://github.com/mum4k/termdash/commit/d6c153fbafee70df3e1eaab8830c2620db87387f) Implementing the text widget. - [`bb73338`](https://github.com/mum4k/termdash/commit/bb73338abb85d4792d6d79b2008620094529816f) Merge branch 'text-widget/1/widget-options' into text-widget/2/write-options - [`6b39bab`](https://github.com/mum4k/termdash/commit/6b39babddf083f25e40ec0e6e198fa84c96cb210) Merge branch 'text-widget/2/write-options' into text-widget/3/line-scanner - [`a13c1f6`](https://github.com/mum4k/termdash/commit/a13c1f6be23af4d24e6c040f13c538584f768ddd) Merge branch 'text-widget/3/line-scanner' into text-widget/4/scroll-tracker - [`8df67c6`](https://github.com/mum4k/termdash/commit/8df67c6d04ef2fcae382ce2de13d7b42d8b8b2c3) Merge branch 'text-widget/4/scroll-tracker' into text-widget/5/widget - [`d0ca7ec`](https://github.com/mum4k/termdash/commit/d0ca7ec5f5bb80c865c9c4b5c51bf4f8b33b5353) Merge branch 'text-widget/1/widget-options' into text-widget/2/write-options - [`a3dfd1a`](https://github.com/mum4k/termdash/commit/a3dfd1a4a5968a8e3383ad02f3c8e13369cbafcf) Adding licence. ### 📊 Changes **9 files changed** (+2365 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `widgets/text/demo/textdemo.go` (+161 -0) ➕ `widgets/text/line_scanner.go` (+142 -0) ➕ `widgets/text/line_scanner_test.go` (+234 -0) ➕ `widgets/text/scroll.go` (+165 -0) ➕ `widgets/text/scroll_test.go` (+332 -0) ➕ `widgets/text/text.go` (+282 -0) ➕ `widgets/text/text_test.go` (+718 -0) ➕ `widgets/text/write_options.go` (+117 -0) ➕ `widgets/text/write_options_test.go` (+214 -0) </details> ### 📄 Description Each set of options applies to a range of characters equal to the length of the text added. E.g. on write calls like: Write("text", opts1) Write("long text", opts2) The two passed options will be stored as: opts1 for byte range low:0, high:4 opts2 for byte range low:4, high:13 The text itself will be stored in a bytes.Buffer. Works on #4 --- <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:07 +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#168
No description provided.