[PR #40] [MERGED] Support for manually triggered redraw of terminal. #173

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

📋 Pull Request Information

Original PR: https://github.com/mum4k/termdash/pull/40
Author: @mum4k
Created: 6/20/2018
Status: Merged
Merged: 6/22/2018
Merged by: @mum4k

Base: develHead: triggered_redraw


📝 Commits (5)

  • fd18695 The fake widget can now draw custom text.
  • 0e620cf The event queue can now report if it is empty.
  • 7ceec7a Support manually triggered redraw.
  • 1f41c7a First empty the queue, then redraw.
  • 42fd5f8 Improving test coverage.

📊 Changes

6 files changed (+428 additions, -34 deletions)

View changed files

📝 eventqueue/eventqueue.go (+7 -0)
📝 eventqueue/eventqueue_test.go (+12 -4)
📝 termdash.go (+50 -1)
📝 termdash_test.go (+240 -21)
📝 widgets/fakewidget/fakewidget.go (+31 -8)
📝 widgets/fakewidget/fakewidget_test.go (+88 -0)

📄 Description

  • Adding a Controller object that allows triggering of redraw manually.
  • The eventqueue now has an Empty() method to determine if it has been emptied.
  • The fake widget can now display a custom text, needed for tests that want to verify if redraw happened or not.
  • Improving test coverage in the fakewidget.
  • Fixing two races in the termdash_test.
    -- Race1: Waiting for event queue to empty before examining the fake terminal. This ensures that events were processed.
    -- Race2: Moving the test of terminal resize into the group of tests that use the triggered redraw, as that is a convenient way of ensuring that we resize, then redraw and then compare the content.

Fixes #27


🔄 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/40 **Author:** [@mum4k](https://github.com/mum4k) **Created:** 6/20/2018 **Status:** ✅ Merged **Merged:** 6/22/2018 **Merged by:** [@mum4k](https://github.com/mum4k) **Base:** `devel` ← **Head:** `triggered_redraw` --- ### 📝 Commits (5) - [`fd18695`](https://github.com/mum4k/termdash/commit/fd186956f624cfbf791d0d79faaa1f0e7d7ac142) The fake widget can now draw custom text. - [`0e620cf`](https://github.com/mum4k/termdash/commit/0e620cf3cab45689f70f22e93f0a482d3efd3f2b) The event queue can now report if it is empty. - [`7ceec7a`](https://github.com/mum4k/termdash/commit/7ceec7a5722966a9a7b23d6d32f28b28d91d9a05) Support manually triggered redraw. - [`1f41c7a`](https://github.com/mum4k/termdash/commit/1f41c7afee2a24951a11b7798e7789232352b15b) First empty the queue, then redraw. - [`42fd5f8`](https://github.com/mum4k/termdash/commit/42fd5f8ccb95557f1d43e8f730a16ae82199c3e4) Improving test coverage. ### 📊 Changes **6 files changed** (+428 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `eventqueue/eventqueue.go` (+7 -0) 📝 `eventqueue/eventqueue_test.go` (+12 -4) 📝 `termdash.go` (+50 -1) 📝 `termdash_test.go` (+240 -21) 📝 `widgets/fakewidget/fakewidget.go` (+31 -8) 📝 `widgets/fakewidget/fakewidget_test.go` (+88 -0) </details> ### 📄 Description - Adding a Controller object that allows triggering of redraw manually. - The eventqueue now has an Empty() method to determine if it has been emptied. - The fake widget can now display a custom text, needed for tests that want to verify if redraw happened or not. - Improving test coverage in the fakewidget. - Fixing two races in the termdash_test. -- Race1: Waiting for event queue to empty before examining the fake terminal. This ensures that events were processed. -- Race2: Moving the test of terminal resize into the group of tests that use the triggered redraw, as that is a convenient way of ensuring that we resize, then redraw and then compare the content. Fixes #27 --- <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:08 +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#173
No description provided.