Summary: | Marked text is cut out when switching between documents (ibus input method) | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | J.O. Aho <trizt> |
Component: | part | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | adaptee, digital.mermaid, fwkde.vacset, ivan_petkov, me, m_runwal, niklas.laxstrom, p.vorel, rehash_fd, rolrolrol, SilverSurfer972, stream.gazer, zanetu |
Priority: | HI | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Bt at 'KateView::removeSelectedText()' |
Description
J.O. Aho
2010-08-20 23:11:03 UTC
*** 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. *** |