Heidi Breaking Copy and Paste in Query

stevepburgess's profile image stevepburgess posted 4 weeks ago in General Permalink

Hi, I am using the latest version of HeidiSQL on Windows 11 (Home). Database is MariaDB 10.11.14.

If I run a query that includes a JSON field (LONGTEXT with JSON constraint) and then try to copy the JSON field into the clipboard (by first viewing it in the Heidi text Editor) I get a system sound from windows indicating an error. Pasting produces no output. See "Untitled Project.mp4"

When I have done this once, copy/paste is then broken even in other applications (e.g Notepad++). Closing Heidi fixes the problem in other applications.

I have noticed it happens on fields where the JSON is displayed in one line in the editor and wrap long lines toggle isn't clickable though I can't see why some entries are displayed on one line and others aren't. E.g.

image.png

are

image.png

are entries in the same query. Copy (and paste) works on the first example but not the second. And Wrap Long Lines is not clickable in the second.

Thanks! Steve

1 attachment(s):
ansgar's profile image ansgar posted 4 weeks ago Permalink

then try to copy the JSON field into the clipboard (by first viewing it in the Heidi text Editor) I get a system sound from windows indicating an error.

Please watch out for messages in the log panel at the bottom, when you open the text editor. In some exception cases I have a "Beep" + log message which you may see there.

stevepburgess's profile image stevepburgess posted 4 weeks ago Permalink

Hi there, thanks for speedy response.

Getting this in log panel (had to type it as copy and paste stopped working after I tried copy on the JSON :)

When I view in Text Editor (field content is 12751 characters)

[13:15:36.649] Auto disabling word wrap and syntax highlighter for large text

When I try copy: [13:15:40.369] EAbort: Operation Aborted

Code modification/commit a41d2dd from Ansgar Becker <anse@heidisql.com>, 3 weeks ago, revision 12.16.0.7249
fix: EAbort crash when copying text from SynEdit without a highlighter

This removes code for copying SynEdit contents in a rich text variant to clipboard, which seems highly unreliable and anyway mostly unwanted. See https://www.heidisql.com/forum.php?t=44899
ansgar's profile image ansgar posted 3 weeks ago Permalink

Yes I could reproduce it. And I think I fixed that for upcoming builds.

stevepburgess's profile image stevepburgess posted 3 weeks ago Permalink

Excellent thanks. :)

herman1's profile image herman1 posted 3 weeks ago Permalink

That’s a pretty strange issue, but it sounds like HeidiSQL is having trouble handling that JSON when it’s displayed as one long line. The fact that copy/paste stops working across the whole system until you close Heidi suggests it’s messing with the clipboard rather than just failing to copy normally. It might be choking on large or unformatted JSON data in the editor.

You could try formatting (pretty-printing) the JSON first so it’s not all on one line, or copy directly from the result grid instead of the text editor. Also worth checking if you’re on the latest version of HeidiSQL, or even trying an older build to see if it behaves differently. As a workaround, exporting the field instead of copying might save you some trouble for now. Definitely feels like a bug rather than anything you’re doing wrong

stevepburgess's profile image stevepburgess posted 3 weeks ago Permalink

Hi thanks for the message. The issue was resolved in a nightly build the next day so all sorted. 🙂

Please login to leave a reply, or register at first.