all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 18422@debbugs.gnu.org
Subject: bug#18422: 24.3.93; Assertion violation when resizing mini-window on a TTY
Date: Tue, 09 Sep 2014 16:12:21 +0300	[thread overview]
Message-ID: <83oaupaqfe.fsf@gnu.org> (raw)
In-Reply-To: <540D7776.8090904@gmx.at>

> Date: Mon, 08 Sep 2014 11:31:34 +0200
> From: martin rudalics <rudalics@gmx.at>
> 
> One possible fix would be:
> 
> === modified file 'lisp/window.el'
> --- lisp/window.el	2014-08-29 10:39:17 +0000
> +++ lisp/window.el	2014-09-08 08:45:23 +0000
> @@ -2388,6 +2388,8 @@
>   	;; why we do not do that.
>   	(window--resize-this-window root (- delta) nil nil t)
>   	(set-window-new-pixel window (+ height delta))
> +	(set-window-new-total window (/ (window-new-pixel window)
> +					(frame-char-height frame)))
>   	;; The following routine catches the case where we want to resize
>   	;; a minibuffer-only frame.
>   	(when (resize-mini-window-internal window)
> 
> 
> 
> But I'm afraid that other windows might be affected as well so I'd
> prefer to do this instead:
> 
> === modified file 'src/dispnew.c'
> --- src/dispnew.c	2014-09-08 06:00:58 +0000
> +++ src/dispnew.c	2014-09-08 09:04:18 +0000
> @@ -1708,7 +1708,7 @@
>       }
>   #endif /* HAVE_WINDOW_SYSTEM */
> 
> -  return WINDOW_TOTAL_LINES (w);
> +  return WINDOW_PIXEL_HEIGHT (w);
>   }
> 
> 
> @@ -1734,7 +1734,7 @@
>       }
>   #endif /* HAVE_WINDOW_SYSTEM */
> 
> -  return w->total_cols;
> +  return WINDOW_PIXEL_WIDTH (w);
>   }

I already tried this before reporting the bug.  It doesn't work,
because we then hit these assertions in fake_current_matrices:

	  eassert (m->matrix_h == WINDOW_TOTAL_LINES (w));
	  eassert (m->matrix_w == WINDOW_TOTAL_COLS (w));

In general, I think it's a bad idea to have bogus values in
WINDOW_TOTAL_LINES and WINDOW_TOTAL_COLS, they are not documented to
be invalid under any circumstances, so the code relies on them.

What exactly frightens you in your first proposal?  Perhaps we should
install my patch on the emacs-24 branch and your window.el patch on
the trunk?





  reply	other threads:[~2014-09-09 13:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 19:23 bug#18422: 24.3.93; Assertion violation when resizing mini-window on a TTY Eli Zaretskii
2014-09-08  9:31 ` martin rudalics
2014-09-09 13:12   ` Eli Zaretskii [this message]
2014-09-10  8:03     ` martin rudalics
2014-09-10 17:33       ` Eli Zaretskii
2014-09-11  9:25         ` martin rudalics
2014-09-11 15:11           ` Eli Zaretskii
2014-09-11 16:40             ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83oaupaqfe.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=18422@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.