[PR #378] [CLOSED] Throttle resize handling. Fixes #377 #930

Closed
opened 2026-03-04 01:08:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/378
Author: @tony--
Created: 12/11/2019
Status: Closed

Base: masterHead: issue377


📝 Commits (2)

  • 25df627 Throttle resize handling. Fixes #377
  • f1d31d3 Change throttle interval and fix style per PR feedback

📊 Changes

1 file changed (+12 additions, -2 deletions)

View changed files

📝 application.go (+12 -2)

📄 Description

This fixes #377
Sorry for any obvious mistakes; I am a golang novice.
I read over the contribution guidelines and tried to match the style.
I don't believe this is adding significant maintenance overhead.

The objective is to add some throttling to the resize handling so that the screen does not flash on Windows. I fiddled with the throttling a bit and 200ms seems like the sweet spot between too low (resulting in allowing some flashing) and too high (too slow resize redraw makes it seem laggy). Here is capture of the post-fix behavior:
after fix

Compare with the capture of before-fix behavior:
before fix

Thanks in advance for taking the time to review!


🔄 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/rivo/tview/pull/378 **Author:** [@tony--](https://github.com/tony--) **Created:** 12/11/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `issue377` --- ### 📝 Commits (2) - [`25df627`](https://github.com/rivo/tview/commit/25df627573a2b43f813d3b4035dfb6d5dedbbf30) Throttle resize handling. Fixes #377 - [`f1d31d3`](https://github.com/rivo/tview/commit/f1d31d3b40bb2e7ae494f28d6b71dfa37f1255a9) Change throttle interval and fix style per PR feedback ### 📊 Changes **1 file changed** (+12 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `application.go` (+12 -2) </details> ### 📄 Description This fixes #377 Sorry for any obvious mistakes; I am a golang novice. I read over the contribution guidelines and tried to match the style. I don't believe this is adding significant maintenance overhead. The objective is to add some throttling to the resize handling so that the screen does not flash on Windows. I fiddled with the throttling a bit and 200ms seems like the sweet spot between too low (resulting in allowing some flashing) and too high (too slow resize redraw makes it seem laggy). Here is capture of the post-fix behavior: ![after fix](https://user-images.githubusercontent.com/513830/70583677-520d1700-1b73-11ea-86a3-1c2c085dc00f.gif) Compare with the capture of before-fix behavior: ![before fix](https://user-images.githubusercontent.com/513830/70582356-1f611f80-1b6f-11ea-95e7-7720a2ee299b.gif) Thanks in advance for taking the time to review! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:37 +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/tview#930
No description provided.