Version: unspecified (using KDE 4.4.5) OS: Linux If you mark a text in document A and switch to document B and then back to document A, the marked text is cut out. Reproducible: Always Steps to Reproduce: 1. Open 2 documents 2. Mark a part of the text in first document 3. Switch to second document 4. Switch back to first document Actual Results: The marked text has disappeared. Expected Results: You would see the marked text. There seems to be a number of people who has had this problem (most of those have thought the bug is in Kdevelop, but it's in Kate), with different distributions. The option "Editing / General / Copy/Cut the current line if no selection" is disabled. I have tried to delete all Kate configurations, but the problem is still there (enable and then disable the Copy/Cut feature don't make any change, it seems to make things slightly worse). This is extremely bad when you code and do some copy between your source and header files, suddenly you are missing code.
*** Bug 220308 has been marked as a duplicate of this bug. ***
This is probably a input mode issue. What input mode do you use? In bug #248558 the bug seems to reproducible with IBus.
Yes, I do have IBus installed, not personally using it, but I have someone else who does use it to write traditional Chinese.
I'm having this too, and yes I have iBus enabled (and have had a lots of problems due to it).
Can somebody start kate in a debugger $ gdb kate (gdb) b 'KateView::removeSelectedText()' Do whatever you need to reproduce the bug (gdb) bt and paste the backtrace here
Created attachment 50862 [details] Bt at 'KateView::removeSelectedText()' Here's a such backtrace.
Thanks Does this patch fix it for you Index: kate/view/kateviewinternal.cpp =================================================================== --- kate/view/kateviewinternal.cpp (revision 1144411) +++ kate/view/kateviewinternal.cpp (revision 1144412) @@ -3574,9 +3574,6 @@ void KateViewInternal::inputMethodEvent( //kDebug( 13030 ) << "Event: cursor" << m_cursor << "commit" << e->commitString() << "preedit" << e->preeditString() << "replacement start" << e->replacementStart() << "length" << e->replacementLength(); - if ( m_view->selection() ) - m_view->removeSelectedText(); - bool createdPreedit = false; if (!m_imPreeditRange) { createdPreedit = true; @@ -3590,6 +3587,8 @@ void KateViewInternal::inputMethodEvent( } if (!e->commitString().isEmpty() || e->replacementLength()) { + m_view->removeSelectedText(); + KTextEditor::Range preeditRange = *m_imPreeditRange; KTextEditor::Cursor start(m_imPreeditRange->start().line(), m_imPreeditRange->start().column() + e->replacementStart());
(In reply to comment #7) > Thanks > > Does this patch fix it for you I don't have environment set up to compile kate myself, so it's not easy for me to test this patch.
Do you have a similar patch for Kate version 3.4.5 (this is the one which comes with KDE 4.4.5 in Gentoo)? If so, then I can try out the patch as that version don't have the kateviewinternal.cpp, so can't use your current patch.
You need to apply the patch in kdelibs
The patch seems to fix my problem.
Same problem. The bug occurs only when using ibus. I'm using Kate v3.5.1 with KDE 4.5.1 (Kubuntu 10.10 amd64).
This bug occurs in chromium v8.0.558.0 as well. But it doesn't occur in Firefox v3.6.10. Just FYI.
*** Bug 252215 has been marked as a duplicate of this bug. ***
This bug occurs in Firefox v3.6.12 when editing Google Docs. Just FYI.
*** Bug 257225 has been marked as a duplicate of this bug. ***
Hi everyone. Someone with this problem now has to compile Kate according to http://kate-editor.org/get-it/ Then, change the lines in kateviewinternal.cpp according to comment #7 and report here whether this problem is then fixed. If you do not test it, this will not get resolved. So we really rely on your cooperation here! Thanks a lot :)
Pascal, in comment #11 we even have already someone who says your patch fixes the issue. What about committing for 4.6? It should have gone into beta1, a pity.
*** Bug 257467 has been marked as a duplicate of this bug. ***
Closed #257467 as a duplicate of this bug. Note that the same "delete highlighted" happens when closing the search bar with text highlighted.
It's in trunk since June According to comment #43 of bug 220308 it was not working That's why I didn't backport at that time I will backport
SVN commit 1199457 by pletourn: Remove selection only when receiving input CCBUG:248558 M +2 -3 kateviewinternal.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1199457
Ah ok, wasn't aware that it's in trunk! > According to comment #43 of bug 220308 it was not working In other words, we still need more people compiling Kate http://kate-editor.org/get-it/ and report back what happens (no need to apply the patch, it's already applied).
(In reply to comment #23) > Ah ok, wasn't aware that it's in trunk! > > > According to comment #43 of bug 220308 it was not working > > In other words, we still need more people compiling Kate > http://kate-editor.org/get-it/ and report back what happens (no need to apply > the patch, it's already applied). I have this bug and I confirm that compiling Kate solves it. FYI, this bug only appears if ibus sends editable text to the editor. It can be disabled by unselecting "Embed preedit text in application window" option in ibus-setup. Thus, it provides a work-around when ibus input is not needed.
I recompiled with the edit mentioned and this solved the problem for me as well.
*** Bug 266394 has been marked as a duplicate of this bug. ***
*** Bug 249772 has been marked as a duplicate of this bug. ***
So if I understand correctly, this report can be closed as fixed? Please confirm.
I do not have this problem when using ibus-1.4.0 and kate-3.7.3.
*** Bug 284558 has been marked as a duplicate of this bug. ***