From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: window-text-pixel-size and presumable move_it_to change(s)
Date: Fri, 24 Jun 2016 10:09:34 +0200 [thread overview]
Message-ID: <576CEABE.9010706@gmx.at> (raw)
In-Reply-To: <83twgk2c1i.fsf@gnu.org>
> The problem is in the new code
> in Fwindow_text_pixel_size:
>
> x = min (move_it_to (&it, end, INT_MAX, max_y, -1,
> MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y),
> max_x);
>
> This will call move_it_to twice, and the second call will return a
> different value from the correct one, returned by the first call.
> Replace this by something less fancy, like
>
> x = move_it_to (&it, end, INT_MAX, max_y, -1,
> MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
> if (x > max_x)
> x = max_x;
>
> and Bob'll be your uncle.
That was the cause. Thanks for the solution.
> (In general, I suggest to make a rule to never use 'min' or 'max' when
> their arguments are expressions.)
Indeed, I have to be more careful in this regard.
Many thanks, martin
prev parent reply other threads:[~2016-06-24 8:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 8:18 window-text-pixel-size and presumable move_it_to change(s) martin rudalics
2016-06-23 14:51 ` Eli Zaretskii
2016-06-24 8:09 ` martin rudalics [this message]
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=576CEABE.9010706@gmx.at \
--to=rudalics@gmx.at \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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.