[GH-ISSUE #882] Unexpected line breaks in TextView #642

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

Originally created by @sshelll on GitHub (Sep 6, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/882

When I tried to run the codes in the Wiki of TextView,
I modified the codes because I wanted to highlight some chars instead of words.
Here's the code:
image

And then I got the result like this:
image

There're many unexpected line breaks after the target char ('t' in this example).

Is this a bug?
Or there's another way to achieve the goal: highlight single char without line breaks?

PS: I also want to refresh the screen char by char, that's why I called time.Sleep() in each round.

My Env:

  • OS = MacOS Ventura 13.5.1
  • Term = Alacritty
  • Font = Hack Nerd Font
Originally created by @sshelll on GitHub (Sep 6, 2023). Original GitHub issue: https://github.com/rivo/tview/issues/882 When I tried to run the codes in the Wiki of TextView, I modified the codes because I wanted to highlight some chars instead of words. Here's the code: ![image](https://github.com/rivo/tview/assets/49158400/36d09de0-6e42-4c58-a058-33ed83a3ae2a) And then I got the result like this: ![image](https://github.com/rivo/tview/assets/49158400/4e5d695e-92da-4433-b296-9d7cd07d9576) There're many unexpected line breaks after the target char ('t' in this example). Is this a bug? Or there's another way to achieve the goal: highlight single char without line breaks? PS: I also want to refresh the screen char by char, that's why I called `time.Sleep()` in each round. My Env: - OS = MacOS Ventura 13.5.1 - Term = Alacritty - Font = Hack Nerd Font
kerem closed this issue 2026-03-04 01:06:42 +03:00
Author
Owner

@rivo commented on GitHub (Sep 6, 2023):

This looks like a bug. Let me get back to you once I know more.

<!-- gh-comment-id:1708717986 --> @rivo commented on GitHub (Sep 6, 2023): This looks like a bug. Let me get back to you once I know more.
Author
Owner

@rivo commented on GitHub (Sep 7, 2023):

I found the issue. The latest commit should fix this.

<!-- gh-comment-id:1709521905 --> @rivo commented on GitHub (Sep 7, 2023): I found the issue. The latest commit should fix this.
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#642
No description provided.