Emacs: disable line truncation only in the minibuffer

I use ido mode to switch files and buffer in Emacs 23.

The following options allow you to resize the minibuffer if the directory contains more than one line of files:

(setq resize-mini-windows t) ; grow and shrink as necessary
(setq max-mini-window-height 3) ; grow up to max of 3 lines

However, this only works if line truncation is not enabled by default (globally):

(setq-default truncate-lines t) ; Truncate, do not wrap lines

I like this option for my main editing window, but it also cancels the above function to display more than one line in the minibuffer. The row in the minibuffer is also truncated, not wrapped.

Is there a way to enable line truncation for the main editing window and disable it only in the minibuffer?

+3
source share
1 answer

truncate-lines nil . :

(add-hook 'minibuffer-setup-hook
      (lambda () (setq truncate-lines nil)))
+8

Source: https://habr.com/ru/post/1723551/


All Articles