Summary: | Autocompletion should be disabled when recording a macro or it should be taken into account | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Giacomo Alzetta <giacomo.alzetta> |
Component: | Vi Input Mode | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | matt.scheirer, mikisabate |
Priority: | NOR | ||
Version: | 3.13.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/ktexteditor/commit/1cf7dfe39e778a742b8fb8a18c88e1e15f7b5b07 | Version Fixed In: | |
Sentry Crash Report: |
Description
Giacomo Alzetta
2014-04-28 15:51:34 UTC
Your example works for me both in the KDE/4.13 branch and in the master branch. Could you provide another example, or an example of this issue in Kile ? Thanks ! What do you mean by "work"? that you obtain the expected Hellox3 file? I'm using Kate 3.13.0 on KDE SC 4.13 that comes with Kubuntu 14.04. Kile v 2.1.3 that comes with Kubuntu. Anyway, the bug I mentioned about Kile is the following. Try the following in a blank file in Normal Mode: qai\begin{figure}<Enter><Backspace>\end{figure}<Enter><Esc>q This is what I see on the file after finishing recording the macro: \begin{figure} \end{figure} \end{figure} The final \end{figure} was added automatically by Kile and I has two manually type the first \end{figure}. If I don't type \end{figure} then it is as if it didn't exist. Now putting the cursor at the end of the file and calling @a to run the macro outputs this: \begin{figure\end{figure} Note missing: }<Enter> It just occurred to me that it seems like the <Backspace> is deleting the newline *and* the preceding character. I cannot reproduce this using only Kate. (I just realized that I shouldn't actually press <Backspace> because, since the indent was added automatically it isn't really recorded. However this still doesn't explain why the } is deleted.) For example trying to achieve the same result with Kate's autoindent the backspace behaves properly, only removing the indentation space. (This is odd. Is Kile doing autocompletion in a different way?) Anyway what is really annoying is the fact that when I write: \begin{figure}<Enter> it gets autocompleted but the autocompletion is useless as far as the macro is interested. It only adds clutter that I then have to keep in mind. For example: suppose I want to record a macro that inserts \begin{figure}<Enter> and then goes down two lines and does other things, while I'm recording this I'd have an \end{figure} in the mid of the text I'm modifying but it isn't really there! If autocompletion etc. gets triggered automatically several times it's easy to obtain a big mess of text that does not resemble what the macro has really recorded. Hi there. Yes, the Hellox3 example works as expected for me :) I'm using Kate (master), but it's also working for me in the KDE/4.13 branch (that is, the one that contains the future Kate 3.13.1 version). Anyways, I can reproduce your example in Kile and yes, this is a bug. However, I'm not sure whether this is a bug from the katepart side or if Kile is doing something wrong here. I'll have to investigate more about this. By now, I'll mark this bug report as "confirmed", since I can reproduce your example for Kile. I'll take a look at this as soon as possible. Thanks for the report! Reaffirming autocompletes still aren't recorded still as of 19.04. A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/52 Git commit 1cf7dfe39e778a742b8fb8a18c88e1e15f7b5b07 by Christoph Cullmann, on behalf of Jan Paul Batrina. Committed on 02/01/2021 at 14:10. Pushed by cullmann into branch 'master'. [Vimode] Fix Macro Completion Replay Ctrl-Space input events are caught by KateViewInternal::eventFilter as a QEvent::ShortcutOverride (and not as a QEvent::KeyPress) so it never reaches InsertVimode::handleKeyPress which is where the completion replay is triggered. M +9 -0 src/view/kateviewinternal.cpp https://invent.kde.org/frameworks/ktexteditor/commit/1cf7dfe39e778a742b8fb8a18c88e1e15f7b5b07 |