[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

completion buffer - unsuitable column width

From: David Reitter
Subject: completion buffer - unsuitable column width
Date: Mon, 2 Mar 2009 14:13:17 -0500

I noticed that the columns in completion buffers are awfully wide for me. They also wrap around when the frame is resized, either while displaying it or after killing it explicitly and bringing up a new completion buffer.

Looking at the code, it seems that this is due to an incorrect calculation of the available width in characters:

(defun completion--insert-strings (strings)
           (window (get-buffer-window (current-buffer) 0))
           (wwidth (if window (1- (window-width window)) 79))

In my case, I use face-remapping-alist to assign different faces for the frame default face and the buffer default face. This causes "window-width" to return a figure that does not indicate how much text can be fit in one line in that window.

I don't know how to fix this given that there seems to be no way to calculate the (average) character width of text with a given face.

I haven't encountered such an issue with 22.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]