summaryrefslogtreecommitdiff
path: root/src/bidi.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-02-20 09:18:20 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-02-20 09:18:20 +0400
commit2a14a4f13cdb22f5b6b0840081d977c8d38a91e6 (patch)
tree06dd7c36007f50d291a9443aa0f6901c65c2f4b8 /src/bidi.c
parent1dfcc79e83d3db031b45e9f6b9314dc1f0697b1d (diff)
downloademacs-2a14a4f13cdb22f5b6b0840081d977c8d38a91e6.tar.gz
* search.c (find_newline): Return byte position in bytepos.
Adjust comment. (find_next_newline_no_quit, find_before_next_newline): Add bytepos argument. * lisp.h (find_newline, find_next_newline_no_quit) (find_before_next_newline): Adjust prototypes. * bidi.c (bidi_find_paragraph_start): * editfns.c (Fconstrain_to_field, Fline_end_position): * indent.c (compute_motion, vmotion): * xdisp.c (back_to_previous_line_start, forward_to_next_line_start): (get_visually_first_element, move_it_vertically_backward): Adjust users and avoid calls to CHAR_TO_BYTE where appropriate.
Diffstat (limited to 'src/bidi.c')
-rw-r--r--src/bidi.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/bidi.c b/src/bidi.c
index db2e48a2ca7..364d7e500ba 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1104,14 +1104,11 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t pos_byte)
while (pos_byte > BEGV_BYTE
&& n++ < MAX_PARAGRAPH_SEARCH
&& fast_looking_at (re, pos, pos_byte, limit, limit_byte, Qnil) < 0)
- {
- /* FIXME: What if the paragraph beginning is covered by a
- display string? And what if a display string covering some
- of the text over which we scan back includes
- paragraph_start_re? */
- pos = find_next_newline_no_quit (pos - 1, -1);
- pos_byte = CHAR_TO_BYTE (pos);
- }
+ /* FIXME: What if the paragraph beginning is covered by a
+ display string? And what if a display string covering some
+ of the text over which we scan back includes
+ paragraph_start_re? */
+ pos = find_next_newline_no_quit (pos - 1, -1, &pos_byte);
if (n >= MAX_PARAGRAPH_SEARCH)
pos_byte = BEGV_BYTE;
return pos_byte;