Version: cvs (using KDE KDE 3.1) Installed from: Compiled From Sources Compiler: gcc 2.95 OS: Linux The autocompletion is very annoying now. It's nice that it remembers the typed strings, but: a. ctrl-space does not give me the autocompletion list in some cases (eg. I have a class Foo with static method foo_method), after I type Foo::f and ctrl-space, it will not give me a list with foo_method inside b. pops up automatically after the 3rd entered char, which is nice sometimes, but why cannot I get the same after the first letter with ctrl-space? c. the automatic popup if more than 3 chars are entered is annoyin when you try to undo what you have typed (with Ctrl-Z). It pops up after every Ctrl-Z step and you must press ESC to disappears, otherwise CTRL-Z will not work again. :-( (From Mantia Andras)
This is related to 52746
a) Fixed b) Fixed c) Not fixed, but you can use backspace! AFAIK Roberto was the one that fixed it.
After some arguing we reopen this bug...
... and reassign it to katepart. If Kate has a completion box open, and the user produces an undo event, should it not be up to Kate to do the correct thing here? (Which would be to close the completion box and execute one undo step.)
*** Bug 52746 has been marked as a duplicate of this bug. ***
>If Kate has a completion box open, and the user produces an undo event, should >it not be up to Kate to do the correct thing here? (Which would be to close >the completion box and execute one undo step.) Actually IMHO this isn't even close to the right behaviour. An auto-complete box should not be being generated from an undo in the first place IMO, that will just result in a myrid of boxes appearing and disappearing all over the place while you hold down Ctrl+z to undo a bunch of stuff, thus slowing the UI down needlessly. I don't know why an atuo-complete box should be created for any text that wasn't the result of the user typing.
I agree that KDevelop doesn't do this gracefully, but I still think the main part of the problem
bleh. hit the wrong button.. :) I agree that KDevelop doesn't do this gracefully, but I still think the main part of the problem lies with Kate, as: 1. KDevelop doesn't immediately trigger the autocompletion box after an undo, it's only after the regular timeout it happens, and so it is quite possible to undo past a triggerpoint - you only need to be quick enough :) 2. It's very hard, if not impossible, for KDevelop to know that the textChanged() signal it receives is a result of an undo operation. 3. The "multiple undo" case isn't the only to hit upon this issue. It's quite possible to mistype and receive an autocomplete box as a result and then, again, you can't undo your way out of it (using ctrl+z or whatever the shortcut happens to be, it is possible with the toolbar button). So, IMHO and without knowing anything about the Kate code in question, if katepart simply closes the autocompletion box when the user hits the undo shortcut, the major part of this problem is solved.
Subject: Re: autocompletion part has strange behavior On November 14, 2003 12:37 am, Jens Dagerbo wrote: > So, IMHO and without knowing anything about the Kate code in question, if > katepart simply closes the autocompletion box when the user hits the undo > shortcut, the major part of this problem is solved. Yes... when the user hits undo, the autocompletion box should close and the last char typed should be reverted. This would totally solve the bug.
Created attachment 3336 [details] Fix to katepart for unhelpful code completion / undo behaviour Not a particularly nice looking patch, but this does the job - can someone review? Apply in kdelibs/kate/part. Thanks.
Subject: Re: autocompletion part has strange behavior > ------- Additional Comments From rodda@kde.org 2003-11-22 10:13 ------- > Created an attachment (id=3336) > --> (http://bugs.kde.org/attachment.cgi?id=3336&action=view) > Fix to katepart for unhelpful code completion / undo behaviour > > Not a particularly nice looking patch, but this does the job - can someone > review? Apply in kdelibs/kate/part. Thanks. solves the problem, at least for the moment ;) please commit
Subject: kdelibs/kate/part CVS commit by rodda: Fix undo functionality with code completion active. Reviewed by Christoph Cullmann <cullmann@babylon2k.de> CCMAIL: 55276-done@bugs.kde.org M +10 -4 katecodecompletion.cpp 1.32 --- kdelibs/kate/part/katecodecompletion.cpp #1.31:1.32 @@ -203,7 +203,11 @@ bool KateCodeCompletion::eventFilter( QO } + int qtKeyCode = ke->key() | ((ke->state() & Qt::ShiftButton) ? Qt::SHIFT : 0) | ((ke->state() & Qt::ControlButton) ? Qt::CTRL : 0) | ((ke->state() & Qt::AltButton) ? Qt::ALT : 0) | ((ke->state() & Qt::MetaButton) ? Qt::META : 0); + // redirect the event to the editor if( ke->key() == Key_Backspace) { m_view->backspace(); + } else if (qtKeyCode == m_view->m_editUndo->shortcut().keyCodeQt()) { + m_view->m_editUndo->activate(); } else { QApplication::sendEvent( m_view->m_viewInternal, e );
It seems like this problem is back. With Kate 2.5.5 (KDE 3.5.5), when I hit Ctrl-Z to undo a word I just typed, the autocompletion box stays open.