Skip to content

Some characters cause weird behaviours during input and rendering #324

@Bios-Marcel

Description

@Bios-Marcel

I just had someone sent in an app using tview. Every tview is displayed as a two-cell character, even though the actual TM is in one cell. Sometimes the second cell is a different color than the rest of the TextView and sometimes it copies the character above it.

I can't figure out when which situation occurs, but here are two screenshots:

copy letter above

empty box behind tm

The latter can be reproduced with:

package main

import "github.com/rivo/tview"

func main() {
	text := tview.NewTextView()
	text.SetText("Terminals are lovely\nAren't ™ they?")

	app := tview.NewApplication()
	app.SetRoot(text, true)
	app.Run()
}

I Also saw this happen with some other characters sometimes. And I tried this on multiple terminals, those being iTerm2(mac OS), termite(vte-based on linux) and alacritity(linux).

The same also happens when for example inputting into an InputField.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions