rougier / nano-emacs

GNU Emacs / N Λ N O - Emacs made simple
GNU General Public License v3.0
2.54k stars 195 forks source link

minibuffer shows only 4 lines and cuts off #112

Open MarcusE1W opened 2 years ago

MarcusE1W commented 2 years ago

Hi.

Thanks for this great theme/configuration.

I have previously been using ivy with a height of 8 lines with NANO. Works. When I use nano-minibuffer though, I only see 4 lines. I also tried to set '(setq ivy-height 8)' parameter in the 'nano-minibuffer.el' file itself, still only 4 lines.

Except there is a little bit more. In the screenshot you can see the the upper bit of a fifth line, but then it get's cut off. Screenshot

Also function wise I think I can run through all 8 Ivy lines, they are just hidden outside the window.

Steps to reproduce:

  1. set ivy-heigth to 8 in init.el
  2. e.g. M-x or C-x C-f
  3. scroll down below the three shown lines

How I set nano-minibuffer up in init.el:

.
.
(require 'nano-colors) ;; dependency of nano-minibuffer
(require 'nano-minibuffer)
(setq ivy-height 8)   ;; number of lines in e.g. file-selector
.
.

I actually have found a work around.

In 'nano-minibuffer.el' you can set height to 9 (8 lines +1 because of the cut off) then it works well for ivy-height 8. Maybe the height can be set to ivy-heigth+1 instead of being constant ? I am afraid I know nothing about lisp so I would not know how to do that...

rougier commented 2 years ago

I think you may need to set mini-frame-default-height

MarcusE1W commented 2 years ago

I might be using it wrongly, but so far it had no effect.

This is the extract from my init.el

.
.
(setq ivy-height 8)   ;; number of lines in e.g. file-selector
(setq mini-frame-default-height 12)
(require 'nano-colors) ;; dependency of nano-minibuffer
(require 'nano-minibuffer)
.
.

12 is just to test, to make the effect visible

rougier commented 2 years ago

Sorry for the late answer. I think the problem comes from line 60 where I add a hook to inset half a line space at the top of the minibuffer (in order to have half a line-space at the bottom). If you comment this line, that may fix the problem.