diff options
| author | Eli Zaretskii | 2016-07-09 11:01:17 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-07-09 11:01:17 +0300 |
| commit | 0a2aedfe6d650e825a50f25f972bac20d669f5cb (patch) | |
| tree | 28e53a5fc20ec6531b6f5179a09d4f503e317345 /src | |
| parent | e52ad7fdfc7148a75897c92588712169894f7a5c (diff) | |
| download | emacs-0a2aedfe6d650e825a50f25f972bac20d669f5cb.tar.gz emacs-0a2aedfe6d650e825a50f25f972bac20d669f5cb.zip | |
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.c | 2 |
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) | |||
| 4175 | convbytes += padding; | 4175 | convbytes += padding; |
| 4176 | if (convbytes <= buf + bufsize - p) | 4176 | if (convbytes <= buf + bufsize - p) |
| 4177 | { | 4177 | { |
| 4178 | info[n].start = nchars; | ||
| 4179 | if (! minus_flag) | 4178 | if (! minus_flag) |
| 4180 | { | 4179 | { |
| 4181 | memset (p, ' ', padding); | 4180 | memset (p, ' ', padding); |
| 4182 | p += padding; | 4181 | p += padding; |
| 4183 | nchars += padding; | 4182 | nchars += padding; |
| 4184 | } | 4183 | } |
| 4184 | info[n].start = nchars; | ||
| 4185 | 4185 | ||
| 4186 | if (p > buf | 4186 | if (p > buf |
| 4187 | && multibyte | 4187 | && multibyte |