mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-11 02:10:35 -08:00
Fixed a bug with displaying strings padded with blanks.
src/xdisp.c (set_iterator_to_next): Advance string position correctly when padding it with blanks.
This commit is contained in:
parent
34c48e575a
commit
f23590ccc9
2 changed files with 18 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2011-06-11 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (set_iterator_to_next): Advance string position
|
||||
correctly when padding it with blanks.
|
||||
|
||||
2011-06-11 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (next_element_from_buffer): Improve commentary for when
|
||||
|
|
|
|||
15
src/xdisp.c
15
src/xdisp.c
|
|
@ -6305,7 +6305,12 @@ set_iterator_to_next (struct it *it, int reseat_p)
|
|||
|
||||
case GET_FROM_C_STRING:
|
||||
/* Current display element of IT is from a C string. */
|
||||
if (!it->bidi_p)
|
||||
if (!it->bidi_p
|
||||
/* If the string position is beyond string_nchars, it means
|
||||
next_element_from_c_string is padding the string with
|
||||
blanks, in which case we bypass the bidi iterator,
|
||||
because it cannot deal with such virtual characters. */
|
||||
|| IT_CHARPOS (*it) >= it->string_nchars)
|
||||
{
|
||||
IT_BYTEPOS (*it) += it->len;
|
||||
IT_CHARPOS (*it) += 1;
|
||||
|
|
@ -6428,7 +6433,13 @@ set_iterator_to_next (struct it *it, int reseat_p)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!it->bidi_p)
|
||||
if (!it->bidi_p
|
||||
/* If the string position is beyond string_nchars, it
|
||||
means next_element_from_string is padding the string
|
||||
with blanks, in which case we bypass the bidi
|
||||
iterator, because it cannot deal with such virtual
|
||||
characters. */
|
||||
|| IT_STRING_CHARPOS (*it) >= it->string_nchars)
|
||||
{
|
||||
IT_STRING_BYTEPOS (*it) += it->len;
|
||||
IT_STRING_CHARPOS (*it) += 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue