mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #1068] Newlines a are lost (filtered out) when pasting into a textarea #773
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#773
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @svanharmelen on GitHub (Jan 6, 2025).
Original GitHub issue: https://github.com/rivo/tview/issues/1068
I am using the suggested
Application.EnablePaste, and while it does speed up and improve pasting in general, it doesn't fix the issue the newlines appear to be filtered out when pasting. So if I paste a block of text which consists of several lines, I end up with a single line. Is there an option or setting that I need to configure for it to paste the text as is?Example:
When copy/pasted end up like this:
Thanks!
@svanharmelen commented on GitHub (Jan 29, 2025):
Is there any way to fix this with the current version of
tview? Thanks!@rivo commented on GitHub (Mar 29, 2025):
I cannot reproduce this. Running the
demos/textarea/main.godemo, I get this on iTerm2 (macOS):And this is both with
EnablePasteset totrueorfalse.Seems to me that this is rather a terminal application / OS issue than a
tviewissue.@svanharmelen commented on GitHub (Apr 15, 2025):
Interesting... I'm using both Alacritty and Ghostty and both give the same issue. Yet trying the native Terminal app on macOS it indeed seems to work. Any idea what features or setting this could relate to so I can investigate further?
@rivo commented on GitHub (Aug 27, 2025):
Unfortunately, I'm not familiar with either of these terminals. I'd look into the settings. Maybe there's an option to control how text gets pasted. I'd also check if the same issue exists with other programs running inside these terminals.
Will close this for now because it seems that this is not a
tviewissue. Feel to open a new issue if needed or if new information becomes available.@laborin commented on GitHub (Mar 2, 2026):
Please see https://github.com/rivo/tview/pull/1147