/* The start and end bytepos in the output string. */
ptrdiff_t start, end;
- /* The start of the spec in the format string. */
+ /* The start bytepos of the spec in the format string. */
ptrdiff_t fbeg;
/* Whether the argument is a string with intervals. */
{
position++;
if (fieldn < nspec
- && position > info[fieldn].fbeg
+ && bytepos >= info[fieldn].fbeg
&& translated == info[fieldn].start)
{
translated += info[fieldn].end - info[fieldn].start;
{
position++;
if (fieldn < nspec
- && position > info[fieldn].fbeg
+ && bytepos >= info[fieldn].fbeg
&& translated == info[fieldn].start)
{
translated += info[fieldn].end - info[fieldn].start;
(propertize "45" 'face 'italic)))
#("012345 "
0 2 (face bold) 2 4 (face underline) 4 10 (face italic))))
+ ;; Bug #38191
+ (should (ert-equal-including-properties
+ (format (propertize "‘foo’ %s bar" 'face 'bold) "xxx")
+ #("‘foo’ xxx bar" 0 13 (face bold))))
;; Bug #32404
(should (ert-equal-including-properties
(format (concat (propertize "%s" 'face 'bold)