Revert to the initial code after cancelling a completion #7876
-
There are several reasons for why you would want to cancel a completion. Sometimes it pops up where it is not wanted, such as when you are scrolling past something and go a little slow. In this case you notice that your down arrow move in the completion rather than the buffer and my natural instinct is to hit escape to abort the completion. Sometimes you don't find what you are looking for and simply want to abort, thus hit escape. In both these cases you end up with altered code, sometimes across multiple lines. The expected behavior in my opinion is to revert back to how things where before the completion popup. I might look into solving this myself, but wanted to get some input on whether there are good reasons for the existing behavior first. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
If you're looking to cancel the completion and revert to the code before the completion started you should cancel with |
Beta Was this translation helpful? Give feedback.
-
I see, that does make some sense I guess, but what is the use-case for esc not being the same as C-c in this case? |
Beta Was this translation helpful? Give feedback.
-
When you select a completion (with |
Beta Was this translation helpful? Give feedback.
When you select a completion (with
tab
) it gets immediately applied.esc
will just close the popupc-c
will undo the completion. So the usecase is closing the menu without undoing the completion