unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10978: `calendar-string-spread' loses with double-width characters
@ 2012-03-09 11:57 Štěpán Němec
  2012-03-09 12:33 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Štěpán Němec @ 2012-03-09 11:57 UTC (permalink / raw)
  To: 10978

The algorithm used obviously works using `length', but for every
double-width character the resulting string is one char too long when
actually displayed, defeating its purpose when formatting the calendar
mode line (`calendar-update-mode-line' et al.).

Ex.:

(calendar-string-spread '("a" "b" "c") ?\s 10)
;=> "a   b    c" ; OK

(calendar-string-spread '("矢" "b" "c") ?\s 10)
;=> "矢   b    c" ; not OK

-- 
Štěpán





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-16  1:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 11:57 bug#10978: `calendar-string-spread' loses with double-width characters Štěpán Němec
2012-03-09 12:33 ` Eli Zaretskii
2012-03-09 14:05   ` Drew Adams
2012-03-10  9:57     ` Eli Zaretskii
2012-03-10  2:27   ` Glenn Morris
2012-03-10  2:32     ` Glenn Morris
2012-03-10 10:02       ` Eli Zaretskii
2012-03-12 20:26         ` Glenn Morris
2012-03-16  1:12           ` Glenn Morris
2012-03-10  7:32     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).