From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 13399@debbugs.gnu.org
Subject: bug#13399: 24.3.50; Word-wrap can't wrap at zero-width space U-200B
Date: Sat, 02 Feb 2013 19:20:44 +0100 [thread overview]
Message-ID: <510D58FC.2030605@gmx.at> (raw)
In-Reply-To: <83a9rmbo30.fsf@gnu.org>
>> + /* Maximum x pixel position encountered within a display line. */
>> + int max_current_x;
>
> Adding a struct member for the sake of just one user sounds
> unjustified. Can we instead make move_it_to accumulate the value
> internally and return it?
I don't know. IIUC most iterator functions never return something
useful. And if one wants to glue together the results of subsequent
calls of move_it_to, it might make sense to not reset the value
internally.
> In any case, the comment is inaccurate, since the value is accumulated
> across all the display lines traversed by the iterator, not computed
> per display line.
Would "within any line traversed by the iterator" be better?
>> +DEFUN ("window-buffer-pixel-size", Fwindow_buffer_pixel_size, Swindow_buffer_pixel_size, 0, 5, 0,
>
> Why not window-text-pixel-size? The "buffer" part doesn't belong
> here, I think.
Since I also look at buffer portions outside the window, such a term
wouldn't be very accurate either.
> "Lines starting below Y_LIMIT" is ambiguous. I suggest
>
> Lines whose y-coordinate is beyond Y_LIMIT will not be scanned.
OK.
>> +Since calculating the pixel-height of a large buffer can take some time,
>> +it makes sense to specify this argument if the size of the buffer is
>> +unknown. */)
>
> The doc string keeps silent about arguments FROM and TO.
... because I only added them later on ;-) Initially I always scanned
from `point-min' to min (`point-max', y_limit) but later I noticed that
with side-by-side windows it makes sense to start at `window-start'.
>> + /* Actually, we never want move_it_to stop at to_x. But to make sure
>> + that move_it_in_display_line_to always moves far enough, we set it
>> + to MOST_POSITIVE_FIXNUM and specify MOVE_TO_X. */
>> + move_it_to (&it, end, MOST_POSITIVE_FIXNUM, max_y, -1,
>> + MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
>
> Did you test what this does when END is covered by a display string?
No. I didn't try invisible text and other atrocities either. In fact,
I never experimented with a non-ZV end position so far. Which problems
do you see?
martin
next prev parent reply other threads:[~2013-02-02 18:20 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 8:29 bug#13399: 24.3.50; Word-wrap can't wrap at zero-width space U-200B martin rudalics
2013-01-10 19:15 ` Eli Zaretskii
2013-01-11 8:16 ` martin rudalics
2013-01-11 8:58 ` Eli Zaretskii
2013-01-11 10:29 ` martin rudalics
2013-01-11 10:57 ` Eli Zaretskii
2013-01-11 14:30 ` martin rudalics
2013-01-11 14:49 ` Eli Zaretskii
2013-01-11 15:17 ` martin rudalics
2013-01-11 15:22 ` Christopher Schmidt
2013-01-11 18:04 ` martin rudalics
2013-01-11 15:53 ` Eli Zaretskii
2013-01-11 18:04 ` martin rudalics
2013-01-11 16:08 ` Stefan Monnier
2013-01-11 18:06 ` martin rudalics
2013-01-11 18:50 ` Stefan Monnier
2013-01-11 19:29 ` Eli Zaretskii
2013-01-11 22:47 ` Stefan Monnier
2013-01-12 8:28 ` Eli Zaretskii
2013-01-12 13:20 ` Stefan Monnier
2013-01-12 14:12 ` Eli Zaretskii
2013-01-12 16:06 ` Stefan Monnier
2013-02-02 16:48 ` martin rudalics
2013-02-02 17:52 ` Eli Zaretskii
2013-02-02 18:20 ` martin rudalics [this message]
2013-02-02 18:36 ` Eli Zaretskii
2013-02-03 9:44 ` martin rudalics
2013-02-03 16:01 ` Stefan Monnier
2013-02-03 19:32 ` Eli Zaretskii
2013-02-04 17:04 ` martin rudalics
2013-02-04 17:57 ` Eli Zaretskii
2013-01-11 19:08 ` Eli Zaretskii
2013-01-12 14:29 ` martin rudalics
2013-01-12 14:56 ` Eli Zaretskii
2013-01-12 16:37 ` martin rudalics
2013-01-12 16:51 ` Eli Zaretskii
2013-01-12 18:01 ` martin rudalics
2013-01-12 18:38 ` Eli Zaretskii
2013-01-14 18:04 ` martin rudalics
2013-02-03 18:57 ` martin rudalics
2013-02-03 19:45 ` Eli Zaretskii
2017-12-08 1:02 ` Adam Tack
2017-12-08 10:12 ` martin rudalics
2017-12-08 15:38 ` Eli Zaretskii
2017-12-08 20:08 ` Eli Zaretskii
2017-12-09 3:50 ` Adam Tack
2017-12-12 17:13 ` Eli Zaretskii
2017-12-13 4:00 ` Adam Tack
2017-12-13 16:09 ` Eli Zaretskii
2017-12-17 2:22 ` Adam Tack
2020-09-18 14:55 ` Lars Ingebrigtsen
2020-09-18 15:39 ` Eli Zaretskii
2020-09-19 13:15 ` Lars Ingebrigtsen
2020-09-19 14:36 ` Eli Zaretskii
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=510D58FC.2030605@gmx.at \
--to=rudalics@gmx.at \
--cc=13399@debbugs.gnu.org \
--cc=eliz@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.