Xcode Code Completion "flicker"
Asked Answered
L

3

11

I've recently upgraded from Xcode 4.3 to 4.4 and I'm about to bash my screen in with frustration.

The problem I'm having is with the code completion. As I type a variable or method name, the completion window pops up with the suggestions like it's supposed to. But if I attempt to use the cursor keys to scroll between the suggestions, the suggestions disappear and the cursor moves in the code, not between the suggestions. If I press enter to accept the default suggestion, it again dismisses the suggestions and inserts a return into the code taking the cursor to the next line.

This doesn't happen every time I attempt code completion, but it does occur more often than not. For a given name I'm trying to complete, it either works or it doesn't (e.g. if I press escape to get the suggestions back, it will disappear just as quickly as the first time it disappeared for that line/name I was trying to complete). When I get to the next line of code, it's a whole new bet whether it will work or not. It seems that the closer to the actual completion of the name I am, the more likely it is to actually work and accept the suggestion or move between the suggestions. Sometimes, if I act quickly enough, I can move the highlighted suggestion one or two lines before the suggestions disappear. I'm aware that if you don't select a suggestion quickly enough that it's supposed to eventually remove the suggestions (on the order of several seconds), but this behavior is not what I'm describing. I'd be VERY happy at this point if I had a single second to actually respond and select a suggestion from the pop-up.

So far I've tried a clean of the project, deleting all of the project's derived data, and restarting xcode. All of which don't seem to affect the behavior. Any ideas? I've searched stackoverflow and google and haven't found any other people reporting this problem ...

Thanks for any ideas,

Will

UPDATE:

After upgrading to the XCode 4.6 release version (and 4.5 somewhere in the middle there), this problem is still present ... and making edits in the left/main editor window is still a work-around.

Leukemia answered 14/8, 2012 at 17:6 Comment(3)
You'd better file a bug at Apple.Donough
Yea, it's pretty obviously a bug, but I was hoping there could be a work around in the short term.Leukemia
I have the same problem. I get the completion list up, but it closes before I managed to chose anything. It seems somewhat related to the terminal window for LLDB. Before it used to autocomplete words without me chosing anything. After this behavior disappeared and LLDB worked fine then I got this "flicker" in regular code editor window.Plutonian
I
10

I am seeing the same with Xcode 4.4.1. It seems to be related to where the completion window pops up. Debugger pane open or closed does not change anything here.

When in the Assistant Editor trying in the right pane the completion windows flickers. Same line of code in the left window works fine. Single editor works, too.

Inotropic answered 10/9, 2012 at 10:15 Comment(3)
I don't know how I hadn't noticed this before. But you're right! Making the edits in the left main editor pane or a getting rid of the assistant editor seems to "fix" the flicker. Thanks for the temp fix for this bug.Leukemia
+1 you are right! Right editor pane flickers making me CrAzY, left editor work just fine. Finally can focus again on productive work!Startle
This problem still exists in Xcode 4.6.2. Thank goodness it works in the left editor.Fantasize
P
0

Try upgrading to Xcode 4.4.1. I used to have this problem, but I don't seem to have it after upgrading.

If this doesn't solve the problem, a crude workaround seems to be to put a lot of blank lines at the bottom of each file - the problem seems to occur from frequently when the file is scrolled all the way to the bottom.

Positive answered 7/9, 2012 at 11:31 Comment(2)
Unfortunately, I'm on 4.4.1 already. But I just discovered another new feature/bug? When I attempted to put in the blank lines at the end of the file, I put the cursor on the last line then pressed and held the return key. After inserting a all of a single extra line at the bottom of the file, it instantly scrolled me to the top of the window and began inserting blank lines at line 1. I scrolled down to the bottom thinking I must have accidentally hit some weird key combination and ... it did it again. Anyway, even inserting the lines at the bottom didn't fix it. Thanks for the ideas.Leukemia
I think that my problem may be slightly different than yours was. It doesn't seem to happen only near the bottom of a file, but really just about anywhere in it. It also seems to happen more commonly in longer files. I guess that will just teach me to keep my classes short and to the point ...Leukemia
Z
0

There is a fix (at least Xcode 4.6.3): re-create the affected file by deleting it. Now create a new file and copy the content to it and drag it into the project - done. Fixes the issue here. It seems to be tied to certain files.

Zobias answered 12/8, 2013 at 21:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.