nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

`switch-to-buffer` should not start on the current buffer

Open wongandj opened this issue 1 year ago • 1 comments

Purpose of request: To improve the user experience when switching buffers.

Describe your proposed change: When using switch-to-buffer, the current buffer should not be the initial focus of the highlight/pointer; either move it to the bottom of the list, or move the pointer by one increment.

Why do you believe this to be an improvement? It would require one less button press to perform an action that is far more common (switching to the next buffer). There is little use case for switching to the currently-visited buffer.

Additional context/User story: In Emacs, the switch-to-buffer command does not include the current buffer in the completion list (though it may be entered). Moreover, when using vertico-mode (which appears to have inspired Nyxt's interface), the current buffer is placed at the opposite end of the list from the initial pointer position.

Screenshots/Mock ups: N/A


Pre-Build Checklist:

  • [ ] Discussion has occurred.
  • [ ] One or more developers have signed off on this change.
  • [ ] One or more user researchers have signed off on this change.

wongandj avatar Sep 19 '24 16:09 wongandj

It has been discussed before:

I agree 100%. The reason why it doesn't exhibit that behavior is because the current buffer suggestion at the prompt buffer sets the main buffer. In other words, it would be jarring for switch-buffer to immediately change the buffer view. See commit https://github.com/atlas-engineer/nyxt/commit/c61c17ddd023b6690ca2af672878d40f1f69538f. I find the current iteration a bit clumsy though. In my view, a better default would be to list the last visited buffer at the top of the prompt buffer; and disable having the main buffer follow the prompt buffer's current buffer suggestion. But we'd need to discuss it with @jmercouris.

aadcg avatar Oct 08 '24 07:10 aadcg

I still find myself in disagreement. If you wish to change it, you can override the behavior of switch-buffer.

jmercouris avatar Jun 11 '25 04:06 jmercouris