Windows paste is truncated #32

Closed
by makeworld-the-better-one opened 1 year ago · 9 comments
makeworld-the-better-one commented 1 year ago (Migrated from gitlab.com)
Owner

when I try to paste a URL from the clipboard [...] on Windows (win10 x64) it seems to truncate the URL. Similar behaviour using the right mouse click or Edit->paste menu, both of which normally paste OK in other apps.

This was confirmed to be a cview issue, as the same behaviour was exhibited in the simple form demo. Please see this downstream issue for more details and updates.

> when I try to paste a URL from the clipboard [...] on Windows (win10 x64) it seems to truncate the URL. Similar behaviour using the right mouse click or Edit->paste menu, both of which normally paste OK in other apps. This was confirmed to be a cview issue, as the same behaviour was exhibited in the simple form demo. Please see [this downstream issue](https://github.com/makeworld-the-better-one/amfora/issues/43) for more details and updates.
tslocum commented 1 year ago (Migrated from gitlab.com)
Owner

tcell issue: https://github.com/gdamore/tcell/issues/319

A workaround has been found: https://github.com/rivo/tview/issues/92#issuecomment-670208053

This should be fixed in tcell. Please thumbs-up the issue there to draw more attention.

tcell issue: https://github.com/gdamore/tcell/issues/319 A workaround has been found: https://github.com/rivo/tview/issues/92#issuecomment-670208053 This should be fixed in tcell. Please thumbs-up the issue there to draw more attention.
makeworld-the-better-one commented 1 year ago (Migrated from gitlab.com)
Poster
Owner

Thank you for finding those links. Is it possible that workaround can be applied in cview?

Thank you for finding those links. Is it possible that workaround can be applied in cview?
tslocum commented 1 year ago (Migrated from gitlab.com)
Owner

I've added the needed function GetCursorPosition so adding the workaround to your application will not require reflection at least. I will look into adding this workaround to cview with an option to disable it if necessary.

I've added the needed function `GetCursorPosition` so adding the workaround to your application will not require reflection at least. I will look into adding this workaround to cview with an option to disable it if necessary.
makeworld-the-better-one commented 1 year ago (Migrated from gitlab.com)
Poster
Owner

Thanks! Let me know when that's available.

Thanks! Let me know when that's available.
makeworld-the-better-one commented 1 year ago (Migrated from gitlab.com)
Poster
Owner

Since you've added GetCursorPosition, could you help me understand what the workaround function would look like now?

Since you've added `GetCursorPosition`, could you help me understand what the workaround function would look like now?
tslocum commented 1 year ago (Migrated from gitlab.com)
Owner

tcell has just fixed this upstream. I hope to release a new version of cview using tcell/v2 soon.

With the added function, you may use it instead of reflection (cursorPos := ).

tcell has just fixed this upstream. I hope to release a new version of cview using tcell/v2 soon. With the added function, you may use it instead of reflection (`cursorPos := `).
tslocum commented 1 year ago (Migrated from gitlab.com)
Owner

Well, that was easy. There was only minor breakage in tcell/v2.

Well, that was easy. There was only minor breakage in tcell/v2.
makeworld-the-better-one commented 1 year ago (Migrated from gitlab.com)
Poster
Owner

Are you sure? Glad to see it was easy to upgrade, but I'm wary to, as my understanding is that tcell v2 is not stable. Is there anywhere I can read about the differences?

Are you sure? Glad to see it was easy to upgrade, but I'm wary to, as my understanding is that tcell v2 is not stable. Is there anywhere I can read about the differences?
tslocum commented 1 year ago (Migrated from gitlab.com)
Owner

See gdamore's comment:

There will be a following release as well, with support for further control over colors, but this will be in a v2 API because there might be some risk of API breakage (minor but not zero).

Within cview at least, the changes were entirely around Style colors and attributes. Attributes must be set using cview.SetAttributes and tcell colors are no longer TrueColor by default (you must call .TrueColor on them).

See [gdamore's comment](https://github.com/gdamore/tcell/issues/361#issuecomment-680125461): >There will be a following release as well, with support for further control over colors, but this will be in a v2 API because there might be some risk of API breakage (minor but not zero). Within cview at least, the changes were entirely around Style colors and attributes. Attributes must be set using `cview.SetAttributes` and tcell colors are no longer TrueColor by default (you must call `.TrueColor` on them).
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.