[PR #410] [CLOSED] Fix horizontal scrolling text with wide characters in TexView widget #942

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

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/410
Author: @gnojus
Created: 2/22/2020
Status: Closed

Base: masterHead: scroll_fix


📝 Commits (1)

  • 03f7140 Fix horizontal scrolling with wide characters in TexView widget

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 textview.go (+3 -0)

📄 Description

Fixes scrolling lines with double with characters. Example, where the problem occurs without this fix:

package main

import (
	"github.com/rivo/tview"
)

func main() {
	app := tview.NewApplication()
	t := tview.NewTextView().SetWrap(false)

	t.SetText("line 1 😀😀 q w e r t y a b c\nline 2 ---- q w e r t y a b c")

	if err := app.SetRoot(t, false).SetFocus(t).Run(); err != nil {
		panic(err)
	}
}

Maybe a special character should be added instead of invisible half of double with character? Because now they are disappearing at the edges. Like this (though vim and nano use >).


🔄 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/410 **Author:** [@gnojus](https://github.com/gnojus) **Created:** 2/22/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `scroll_fix` --- ### 📝 Commits (1) - [`03f7140`](https://github.com/rivo/tview/commit/03f714065041214b96c1a856622f76aab7dc7805) Fix horizontal scrolling with wide characters in TexView widget ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `textview.go` (+3 -0) </details> ### 📄 Description Fixes scrolling lines with double with characters. Example, where the problem occurs without this fix: ``` package main import ( "github.com/rivo/tview" ) func main() { app := tview.NewApplication() t := tview.NewTextView().SetWrap(false) t.SetText("line 1 😀😀 q w e r t y a b c\nline 2 ---- q w e r t y a b c") if err := app.SetRoot(t, false).SetFocus(t).Run(); err != nil { panic(err) } } ``` Maybe a special character should be added instead of invisible half of double with character? Because now they are disappearing at the edges. Like this `⋯ ` (though vim and nano use `>`). --- <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:41 +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#942
No description provided.