emacs-devel
[Top][All Lists]
Advanced

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

Re: problem of released-button style mode-line


From: Kenichi Handa
Subject: Re: problem of released-button style mode-line
Date: Sat, 21 Oct 2000 11:58:41 +0900 (JST)

Miles Bader <address@hidden> writes:
> Kenichi Handa <address@hidden> writes:
>>  So, if I make a one line window just above the mode-line, it gets
>>  6-dot shorter than normale lines.
>>  
>>  This happens always when a user activate a complex input
>>  method (e.g. japanese and chinese) in the minibuffer.  See
>>  the attached screen shot taken when I activated chinese-py
>>  in the minibuffer and typed `n'.
>>  
>>  Is it possible to make one-line window at least has normal line
>>  height?

> I *think* I've fixed this.

> [It was even worse in my case, because with my fonts, the chinese
> characters don't fit into the minibuffer window, which made the
> minibuffer expand to block the guidance window even when it was
> initially the right size.  But it seems to work now.]

Thank you.  I confirmed that it is fixed, but not
completely.  For instance, if my Chinese font is taller than
the normal line height and I'm using Emacs 20 style
mode-line, the guidance buffer is still only partially
visible because the window is not enlarged by
set-window-text-height.

I think we anyway need a C function something like
window-buffer-fully-visible-p.  Gerd, how is it difficult to
implement it?   If it's too difficult for 21.1, we must use
Miles solution for the moment.

But, for instance, I found that this C function is enough
for Quail guidance because, in that case, we need just one
line fully visible window.  Is it doing the right thing?

DEFUN ("window-cursor-line-fully-visible-p",
       Fwindow_cursor_line_fully_visible_p,
       Swindow_cursor_line_fully_visible_p, 0, 1, 0,
  "Non-nil if the cursor line of WINDOW is fully visible.")
  (window)
       Lisp_Object window;
{
  struct window *w = decode_window (window);
  struct glyph_matrix *matrix;
  struct glyph_row *row;

  redisplay ();

  if (w->cursor.vpos < 0)
    return Qnil;

  matrix = w->desired_matrix;
  row = MATRIX_ROW (matrix, w->cursor.vpos);
  return (MATRIX_ROW_PARTIALLY_VISIBLE_P (row) ? Qnil : Qt);
}

Of course, it's not enough for ispell because it may require
more than one line.  For that, we surely need
window-buffer-fully-visible-p.

---
Ken'ichi HANDA
address@hidden



reply via email to

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