FIXED: Copy & paste causes corruption

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
u00000000
Posts: 10
Joined: 06 Oct 2016 22:34

FIXED: Copy & paste causes corruption

Post by u00000000 » 18 Jun 2020 23:21

This is really odd behaviour. I've tried to strip down the minimal text to cause the problem. File is attached in .ZIP, but contents are also below to try and explain the problem.
  1. Version 14.52 64-bit running on Windows 10 1909
  2. Open editor
  3. Open the sample file (Test8.txt)
  4. Double-click on the item in the 1st line "CAM_ADDR_BASE"
  5. CTRL-C to copy
  6. Double-click on the 4th line "CAM_BLOCK_EGR"
  7. CTRL-V to paste. May have to repeat the double-click + CTRL-V several times for it to happen
  8. Line gets transformed into CAM_ADDR_BASE set bit_list {"" "CAM_RTE_EXCEPT" "CAM_DPORT_EN" "CAM_DPORT_PR" "CAM_DPORT"}
This is just one example, but there are several similar cases during my editing where the line gets corrupted in various ways. The only thing in common is my double-click to select and then copy, then double-click to select and paste.
It seems a little crucial that you do not do anything else other than the steps above. For example if you CTRL-A to select all and then re-paste and try that again it seems to not cause the problem so easily.

Contents of text file:
# CAM_ADDR_BASE (CAM_DATA_REG_4)

set reg_name "CAM_DATA_REG_4"
set bit_list {"CAM_BLOCK_EGR" "CAM_RTE_EXCEPT" "CAM_DPORT_EN" "CAM_DPORT_PR" "CAM_DPORT"}
foreach bit_name $bit_list {
set write_status [::test::reg_write_bit ret_val -device "MyDevice" -terminal_list $term -bit_name $bit_name -reg_name $reg_name -block_list $block_list -stack $stack_num -data $register_values($reg_name|$it_name)]

}


Test8.zip
Sample file to cause problem
(397 Bytes) Downloaded 6 times

User avatar
pjj
Posts: 1727
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Copy & paste causes corruption

Post by pjj » 19 Jun 2020 08:47

Can confirm; however double click before paste (point 6) isn't needed to get this effect (but seems like one double click definitely is).

I can vaguely remember it happened to me once, but I didn't really paid attention to it (assumed it was my fault with the keyboard).
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

u00000000
Posts: 10
Joined: 06 Oct 2016 22:34

Re: Copy & paste causes corruption

Post by u00000000 » 19 Jun 2020 22:19

Good to know I'm not crazy.

Also additional note: Using CTRL-Z to undo the error doesn't restore the previous state correctly either so it's basically close the file without saving and re-open if you want to recover.

User avatar
pjj
Posts: 1727
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Copy & paste causes corruption

Post by pjj » 20 Jun 2020 17:32

u00000000 wrote:
19 Jun 2020 22:19
(...) so it's basically close the file without saving and re-open if you want to recover.
One day you need to try File > Reload current document or RMC on document tab > Reload current document; you'll love it :wink:
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Rickard Johansson
Site Admin
Posts: 5937
Joined: 19 Jul 2006 14:29

Re: Copy & paste causes corruption

Post by Rickard Johansson » 04 Jul 2020 17:25

I've tried this several times on two different systems running Windows 10, but I'm not able to reproduce it.

I'm following the steps exactly but it seems to work at my end, no matter how many times I try to copy and paste...

What am I missing?

User avatar
pjj
Posts: 1727
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: ??? Copy & paste causes corruption

Post by pjj » 04 Jul 2020 20:18

Rickard Johansson wrote:
04 Jul 2020 17:25
What am I missing?
Patience! :lol:

Seriously, pasting after double-click works OK more often than not; sometimes this glitch occurs, though. I never managed to spot it with lorem ipsum, and also never on Windows 10 machine (maybe I didn't try hard enough), but on Windows 7 (probably irrelevant) and with the original sample from u00000000 (which may be relevant) I am able to reproduce it from time to time.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Rickard Johansson
Site Admin
Posts: 5937
Joined: 19 Jul 2006 14:29

Re: ??? Copy & paste causes corruption

Post by Rickard Johansson » 05 Jul 2020 08:59

Thanks :lol:

I have been able to reproduce it on Windows 7, but not on Windows 10 :?

User avatar
Rickard Johansson
Site Admin
Posts: 5937
Joined: 19 Jul 2006 14:29

Re: ??? Copy & paste causes corruption

Post by Rickard Johansson » 05 Jul 2020 14:28

I think it's been fixed now in next release (v14.60). Thanks!

Post Reply