summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2016-07-09 11:01:17 +0300
committerEli Zaretskii <eliz@gnu.org>2016-07-09 11:01:17 +0300
commit0a2aedfe6d650e825a50f25f972bac20d669f5cb (patch)
tree28e53a5fc20ec6531b6f5179a09d4f503e317345 /src
parente52ad7fdfc7148a75897c92588712169894f7a5c (diff)
downloademacs-0a2aedfe6d650e825a50f25f972bac20d669f5cb.tar.gz
Minor tweaks of copying text properties when padding strings
* src/editfns.c (styled_format): Don't include padding on the left in the properties at the beginning of the string. (Bug#23897) * test/src/editfns-tests.el (format-properties): Add tests for faces when the string is padded on the left or on the right.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 73f024409b1..4c8336b8c82 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4175,13 +4175,13 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
convbytes += padding;
if (convbytes <= buf + bufsize - p)
{
- info[n].start = nchars;
if (! minus_flag)
{
memset (p, ' ', padding);
p += padding;
nchars += padding;
}
+ info[n].start = nchars;
if (p > buf
&& multibyte