Bug: copy/cut doesn't always work.
-
- CodeLite Enthusiast
- Posts: 10
- Joined: Tue Jul 26, 2011 9:33 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Bug: copy/cut doesn't always work.
Hi,
I recently found CodeLite. I'm using it for writing some AVR code, and I really like it so far.
I found a little problem. Copy and Cut with the standard key combinations Ctrl+Insert, Shift+Delete doesn't always work. Sometimes, the clipboard is empty after copy or cut. So i copy some text, mark some other text, paste the clipboard with Shift+Insert, and instead of pasting the copied text, an empty string is inserted. This is especially annoying when I used Cut, and then have to Ctrl+Z all the way back to undo the damage.
It only happens every once in a while, I'm guessing every tenth time or so.
Another small thing is that the X clipboard isn't properly utilized (i. e. paste with middle mouse button after marking some text doesn't work). However, that's probably a problem with Scintilla, as Scite and CodeBlocks also had this problem IIRC.
I'm running Ubuntu 11.04, CodeLite version is v2.10.0.4778. If you need any other information please let me know.
edit To clarify, it isn't related to specific key combinations, Ctrl+X or copying/cutting using the context menu works just as unreliable.
I recently found CodeLite. I'm using it for writing some AVR code, and I really like it so far.
I found a little problem. Copy and Cut with the standard key combinations Ctrl+Insert, Shift+Delete doesn't always work. Sometimes, the clipboard is empty after copy or cut. So i copy some text, mark some other text, paste the clipboard with Shift+Insert, and instead of pasting the copied text, an empty string is inserted. This is especially annoying when I used Cut, and then have to Ctrl+Z all the way back to undo the damage.
It only happens every once in a while, I'm guessing every tenth time or so.
Another small thing is that the X clipboard isn't properly utilized (i. e. paste with middle mouse button after marking some text doesn't work). However, that's probably a problem with Scintilla, as Scite and CodeBlocks also had this problem IIRC.
I'm running Ubuntu 11.04, CodeLite version is v2.10.0.4778. If you need any other information please let me know.
edit To clarify, it isn't related to specific key combinations, Ctrl+X or copying/cutting using the context menu works just as unreliable.
Last edited by johannes on Sun Aug 28, 2011 4:43 pm, edited 1 time in total.
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Possible bug: copy/cut doesn't always work.
Hi Johannes,
FWIW, I use debian squeeze, and find the same thing happens, very intermittently, with all programs (I blame 'Kipper'). Is it just in CodeLite for you?
Regards,
David
That makes it difficult to debug . Testing just now on 11.4 didn't show a problem. If you can find a replicable sequence of actions that makes it happen...It only happens every once in a while, I'm guessing every tenth time or so.
FWIW, I use debian squeeze, and find the same thing happens, very intermittently, with all programs (I blame 'Kipper'). Is it just in CodeLite for you?
This is cured in wxWidgets svn (2.9). However it'll be a long time before the distros distribute this (they won't think about doing it until it's released as wx3.0). If it's important enough for you, you can build your own CodeLite against wx svn, or the recently released wx2.9.2.Another small thing is that the X clipboard isn't properly utilized
Regards,
David
-
- CodeLite Enthusiast
- Posts: 10
- Joined: Tue Jul 26, 2011 9:33 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Possible bug: copy/cut doesn't always work.
The X clipboard thing isn't very important for me. It's good to know that it will be fixed in some later release though.
The other problem happens only in CodeLite. Other editors / text entry fields work fine. I'm not using any clipboard utilities like Klipper. I'm running xfce.
I haven't found any replicable sequence of actions to reproduce it. It seems to happen completely at random. I can see that makes it hard to debug. It also makes it very annoying :/
The other problem happens only in CodeLite. Other editors / text entry fields work fine. I'm not using any clipboard utilities like Klipper. I'm running xfce.
I haven't found any replicable sequence of actions to reproduce it. It seems to happen completely at random. I can see that makes it hard to debug. It also makes it very annoying :/
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Possible bug: copy/cut doesn't always work.
Ah, then you're lucky it's working at all : it's an xfce problem. See this CodeLite bug-report.I'm running xfce.
-
- CodeLite Enthusiast
- Posts: 10
- Joined: Tue Jul 26, 2011 9:33 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Possible bug: copy/cut doesn't always work.
I see. But I don't have the problem in other editors, so it looks to me like some incompatibility between CodeLite and XFCE.DavidGH wrote:Ah, then you're lucky it's working at all : it's an xfce problem. See this CodeLite bug-report.
I will try running some clipboard manager plugin, see if I can find a workaround...
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Possible bug: copy/cut doesn't always work.
It's unlikely to be CodeLite itself; more probable is wxScintilla (which CodeLite uses for editor panes) or scintilla itself, on which wxScintilla is based.But I don't have the problem in other editors, so it looks to me like some incompatibility between CodeLite and XFCE.
If you want to investigate, you could see what happens with the wxWidgets 'stc' sample (which in wx2.8 is inside 'contrib'), and/or with other scintilla-based apps e.g. SciTE.
-
- CodeLite Enthusiast
- Posts: 10
- Joined: Tue Jul 26, 2011 9:33 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Possible bug: copy/cut doesn't always work.
I regularly use Code::Blocks, which also uses wxScintilla, and haven't had the problem there. I haven't seen the problem in Scite, either.DavidGH wrote:It's unlikely to be CodeLite itself; more probable is wxScintilla (which CodeLite uses for editor panes) or scintilla itself, on which wxScintilla is based.
If you want to investigate, you could see what happens with the wxWidgets 'stc' sample (which in wx2.8 is inside 'contrib'), and/or with other scintilla-based apps e.g. SciTE.
-
- CodeLite Enthusiast
- Posts: 10
- Joined: Tue Jul 26, 2011 9:33 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Possible bug: copy/cut doesn't always work.
[bump]
Is anyone looking into this? Copy&Paste is one of the fundamental basics of a text editor, so it should be kind of important? CodeLite redistributes the WXScintilla component in source form, so even if the bug is located there, I guess it's kind of the responsibility of CodeLite to at least look into the problem. No?
For a start, I found this in ScintillaWX.cpp:
This looks suspicious to me. Why would you need to copy it 5 times?
Is anyone looking into this? Copy&Paste is one of the fundamental basics of a text editor, so it should be kind of important? CodeLite redistributes the WXScintilla component in source form, so even if the bug is located there, I guess it's kind of the responsibility of CodeLite to at least look into the problem. No?
For a start, I found this in ScintillaWX.cpp:
Code: Select all
void ScintillaWX::Copy() {
if ( !sel.Empty() ) {
SelectionText st;
CopySelectionRange(&st);
#ifdef __WXGTK__
for(int i=0; i<5; i++) {
//wxPrintf(wxT("Copying to clipboard %ld\n"), i);
CopyToClipboard(st);
}
#else
CopyToClipboard(st);
#endif
}
}
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Bug: copy/cut doesn't always work.
Because couple of years ago I found the same bug under KDE, however, what seems to fix the problem was copying the same text again.johannes wrote:This looks suspicious to me. Why would you need to copy it 5 times?
So I added a loop for copying the same text 5 times - this seems to fix the problem and it was never reported again - until now.
It is, however, I can't reproduce it here (Ubuntu 11.4 64 and 32 bit), David was unable to get this problem as well - so its kinda hard to fix a problem that you can't reproduce ...johannes wrote:Is anyone looking into this? Copy&Paste is one of the fundamental basics of a text editor, so it should be kind of important?
I will look into it again and see if there anything that I can workaround
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 10
- Joined: Tue Jul 26, 2011 9:33 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Bug: copy/cut doesn't always work.
Thanks! If I get around to it, I will also look into the code some more. Other things maybe worth mentioning:eranif wrote:It is, however, I can't reproduce it here (Ubuntu 11.4 64 and 32 bit), David was unable to get this problem as well - so its kinda hard to fix a problem that you can't reproduce ...
I will look into it again and see if there anything that I can workaround
- I can reproduce it on two machines, my desktop machine and the netbook. Both run Ubuntu 10.04 32 bit, both run XFCE. So XFCE might be a factor. Although all other editors (also those using (wx)scintilla) don't have the problem.
- CodeBlocks seems to bundle their own customized version of wxScintilla (reported as a "bug" here). The CodeBlocks editor component works for me. Maybe checking what they do differently might give some insight?