New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior from C-c C-o (ivy-occur) #1284

Closed
jwiegley opened this Issue Nov 14, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@jwiegley

jwiegley commented Nov 14, 2017

I'm switching over to ivy/swiper/counsel from helm, and have run into some odd behavior with C-c C-o:

  1. I use counsel-describe-function
  2. Immediately press C-c C-o
  3. Hit RET on any candidate. First odd behavior: it replacing the current buffer with the help text, but then moves point to some other newly displayed buffer which is neither the candidate list, nor the *Help* text. It would be nice if it kept the candidate list, with my point in the candidate list, and just popped up the *Help* text in another buffer.
  4. Move point to the *Help* buffer and hit q
  5. Go back to the candidates list, move point to another line, and hit RET again

Because of (3), examining several items from the candidate list requires a rather large number of keystrokes, because the candidates list keeps disappearing, and you never have focus in the *Help* buffer unless you manually select it.

@abo-abo

This comment has been minimized.

Owner

abo-abo commented Nov 14, 2017

I tried to reproduce this, and the bug happens only sometimes. Depending on the frame size, calling describe-function will split the frame either horizontally or vertically:

  • when it splits vertically, everything works as intended: RET puts the help buffer in focus, f keeps focus in the occur buffer.
  • when it splits horizontally, the bug you describe occurs.

So far, I have no idea how to influence how describe-function splits the frame. I'll have to investigate further later.

@abo-abo

This comment has been minimized.

Owner

abo-abo commented Nov 14, 2017

Looks like once both the occur and the help buffers are in separate windows, f will not disturb the window layout further.

@manuel-uberti

This comment has been minimized.

Contributor

manuel-uberti commented Nov 17, 2017

I can confirm with the horizontal split I have the same behaviour described by @jwiegley.

@mookid

This comment has been minimized.

Contributor

mookid commented Nov 17, 2017

I confirm I can reproduce as well.

As I understand it, at (3) the window from which counsel-describe-function has been called get the focus if it is still visible, which happens for instance when at least 2 windows are visible to begin with.

@abo-abo abo-abo closed this in 3aed683 Nov 17, 2017

@abo-abo

This comment has been minimized.

Owner

abo-abo commented Nov 17, 2017

Thanks, please test.

@manuel-uberti

This comment has been minimized.

Contributor

manuel-uberti commented Nov 18, 2017

Now with horizontal split (after counsel-describe-function), hitting RET on a candidate in the *ivy-occur counsel-describe-function "^counsel"* buffer, point stays in this buffer, and I can see *Help* buffer correctly displayed.

Looks fixed to me. Thank you @abo-abo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment