20

I've recently upgraded to Xcode 5.1 and I'm experiencing the most annoying bug. The instant search or method search dialog that allows you to search the methods on the given source file you are looking at isn't allowing me to enter more than one character. I have large source files and I tend to rely on that a lot. Any idea why this might be happening. I've tried re-installing Xcode (simply be dragging it in the trash).

enter image description here

You can find the search field I'm talking about by clicking the method as shown in the screenshot and simply typing something.

When I type the character gets replaced with the last letter entered.

NSGod
  • 22,699
  • 3
  • 58
  • 66
Etienne
  • 1,197
  • 10
  • 19
  • 1
    I'm not sure, I'm not seeing the problem. It works much as expected for me, I can type any arbitrary string there and it filters the method names. – David Berry Mar 18 '14 at 22:40
  • That's the case for a few people I've asked. I seem to be the only one so far that has seen this issue. – Etienne Mar 18 '14 at 23:03
  • You might have whacked Xcode preferences. See if you have the same problem from the guest account. – geowar Mar 19 '14 at 04:10
  • 1
    @Etienne you are not the only one. I'm also having the same issue. However I'm able to type more than one character if I click on the search text field after typing the first character. But I have to do that every time, so it's not a fix. – kalana Mar 20 '14 at 12:52
  • @clance_911 Thank you so much for this little tip! I can get it to work with for now. Now if only we can find a solution to the problem. – Etienne Mar 21 '14 at 19:40
  • I have the same problem and it drives me crazy. BTW, newly created user does not have this problem. – Moze Mar 25 '14 at 13:33
  • 3
    I found what is causing the problem. Here is how to reproduce it: 1. Connect external display to you macbook. 2. Make macbook's display a main one. 3. Open Xcode in main display and drag to other (not main) display. If you work with Xcode on external display, then make it main by dragging menu bar onto it, in display arrangement settings. – Moze Mar 28 '14 at 07:26
  • I've just tested this with xCode 5.1.1 and it doesn't look like it got fixed. – Etienne Apr 17 '14 at 17:08

2 Answers2

13

It happens if Xcode is open in external display that is not main display.

To fix it, open display setting's Arrangement tab and drag menu bar to display that you are working on.

Moze
  • 333
  • 2
  • 15
  • Good find! Although this helps the situation it doesn't really fix it :( At this point it's looking like we'll have to submit a bug report with Apple. – Etienne Mar 29 '14 at 18:54
13

(This one's just informational: I don't think it will fit in a comment, and want to report on what suggestions worked and didn't.)

I ran into this same problem. I accidentally typed some other key combo when trying to do Ctrl+6 to open the Document Items dropdown, and it was all out of whack after that.

As clance_911 mentioned, the filtering would work after clicking in the search box. So for example, to filter for "init", I could hit Ctrl+6 to open the Document Items, type "i" to start filtering (but then any subsequent letters would replace the i), click into the search text box, and continue typing the "nit". This works, but it's a pain.

As Moze pointed out, this seems to be specific to external displays. Sure enough, it worked fine on my MacBook display, but if I moved Xcode over to the external display, it stopped working. In my case, dragging the menu bar in the display Arrangements settings (to make the external monitor the main display) did solve the problem: the filter worked correctly with Xcode in either window. Sorry, Etienne :-(

The other solution that worked for me was simply closing the MacBook: use it in clamshell mode with only the external display. This is my normal setup anyway, but I know that's not ideal for everyone.

Brock Boland
  • 15,870
  • 11
  • 35
  • 36
  • 1
    I don't think Apple is going to get addressed anytime soon. I'm going to mark this as the answer for now due to the work around you managed to mention: "In my case, dragging the menu bar in the display Arrangements settings (to make the external monitor the main display) did solve the problem: the filter worked correctly with Xcode in either window.". Thanks Brock! – Etienne Apr 17 '14 at 17:12