Giter VIP home page Giter VIP logo

Comments (5)

rntz avatar rntz commented on August 29, 2024

I believe this line, which temporarily binds resize-mini-windows to t, is the cause.

Suggested patch:

--- vertico-flat-original.el    2024-03-31 13:35:08
+++ vertico-flat.el     2024-03-31 13:34:25
@@ -84,8 +84,7 @@
     (push `(vertico--input . ,vertico-flat-map) minor-mode-map-alist)))
 
 (cl-defmethod vertico--display-candidates (candidates &context (vertico-flat-mode (eql t)))
-  (setq-local truncate-lines nil
-              resize-mini-windows t)
+  (setq-local truncate-lines nil)
   (move-overlay vertico--candidates-ov (point-max) (point-max))
   (overlay-put
    vertico--candidates-ov 'after-string

Or perhaps it should be (setq-local truncate-lines nil resize-mini-windows vertico-resize).

But perhaps this is intentional for some reason?

from vertico.

minad avatar minad commented on August 29, 2024

The behavior is intentional, since for multiform setups we want grow only (or fixed size) for the large vertical mini buffer but still use the least amount of vertical space for the flat mini buffer. Ideally the candidates in flat mode fit on a single line anyway so there won't be too much jumping.

from vertico.

rntz avatar rntz commented on August 29, 2024

I must admit I strongly prefer grow-only behavior even for flat/ido-style completions. Is there any way to get this behavior with vertico-flat-mode?

With my patch, you can still get your preferred behavior via, eg:

(setq vertico-multiform-commands
      '((execute-extended-command flat (resize-mini-windows . t))))

from vertico.

minad avatar minad commented on August 29, 2024

I must admit I strongly prefer grow-only behavior even for flat/ido-style completions. Is there any way to get this behavior with vertico-flat-mode?

I strongly do not. ;) You can use an advice to get your desired behavior and override the variables.

from vertico.

rntz avatar rntz commented on August 29, 2024

Fair enough. In case anyone with the same problem stumbles on this thread, here's the advice I used:

(defadvice vertico--display-candidates (after reset-resize-mini-windows compile)
  (setq resize-mini-windows vertico-resize))

from vertico.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.