Cycle Clipboard - what is it used for?

Discuss any topics about the editor here

Cycle Clipboard - what is it used for?

Postby rovf » Wed May 21, 2014 8:24 am

Using Editra 0.7.20 on OSX 10.6:

What is the Command Edit/CycleClipboard used for? I played around with it, and the only difference to Edit/Paste seems to be, that the pasted text is selected afterwards.
rovf
User
 
Posts: 8
Joined: Wed May 21, 2014 8:19 am

Re: Cycle Clipboard - what is it used for?

Postby cody » Wed May 28, 2014 1:30 pm

It lets you cycle through things you have previously copied to the clip board.

For example say at different times you had copied the following text.

Hello
World
Beer <- Current clipboard text

The cycle clipboard command will let you cycle back to Hello or World and allow you to paste them again if you want while still being able to paste Beer.


Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Cycle Clipboard - what is it used for?

Postby rovf » Wed May 28, 2014 4:35 pm

cody wrote:It lets you cycle through things you have previously copied to the clip board.

For example say at different times you had copied the following text.

Hello
World
Beer <- Current clipboard text

The cycle clipboard command will let you cycle back to Hello or World and allow you to paste them again if you want while still being able to paste Beer.


Hmmm...., this was what I suspected in the first place, but it doesn't seem to work on my platform (OSX 10.6).

I guess you mean which copying the usual copy-to-clipboard command (on the Mac it's Apple-C)?
rovf
User
 
Posts: 8
Joined: Wed May 21, 2014 8:19 am

Re: Cycle Clipboard - what is it used for?

Postby cody » Fri May 30, 2014 2:45 pm

Just to confirm your usage

1) Select some text and Cmd+C
2) Select some different text and Cmd+C
3) Select some different text and Cmd+C
4) Put cursor somewhere
5) Hit Cmd+I (Continue holding Cmd down)
6) most recent item in clipboard should showup in document
7) Hit I again
8) Second item in clipboard history should now show up in document in place of one from #6
9) Repeat hitting 'I' until final text you wish to insert is shown
10) release Cmd key
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Cycle Clipboard - what is it used for?

Postby rovf » Sat May 31, 2014 8:47 am

cody wrote:Just to confirm your usage
1) Select some text and Cmd+C
2) Select some different text and Cmd+C
3) Select some different text and Cmd+C
4) Put cursor somewhere
5) Hit Cmd+I (Continue holding Cmd down)
6) most recent item in clipboard should showup in document
7) Hit I again
...


I tried, and I think I got a hint of where the problem is: The procedure mentioned, works fine, as long as the buffer contains only characters which are 1 byte long. As soon as I put in characters, which in UTF-8 encoding are 2 or 3 characters long, the resulting behaviour is random: Sometimes, it just pastes the last string, no matter how often I hit I again with Cmd held down. Sometimes it pastes a different, seemingly unrelated string. Sometimes it cycles, sometimes it doesn't.

Since nearly all of my files contain small pieces of Japanese text, I didn't notice the difference earlier, but it really seems to be related to UTF8 encoding.
rovf
User
 
Posts: 8
Joined: Wed May 21, 2014 8:19 am

Re: Cycle Clipboard - what is it used for?

Postby cody » Mon Jun 02, 2014 5:39 pm

Its possible, the StyledTextCtrl object which is used by Editra as its main text editor view unfortunately has some issues with multibyte text in some cases.

The way selections are returned from the API is what is at fault here I am guessing as it is probably not returning the true end position and is instead cutting one or more of the bytes in half in the display.

Sorry but not sure if there is any easy fix for this. I don't work on this project much at all any more so cant promise a fix unless someone else provides a patch to work around this issue.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron