summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasushi SHOJI <yashi@atmark-techno.com>2013-10-12 20:10:06 +0900
committerBastien Guerry <bzg@altern.org>2013-11-04 13:11:12 +0100
commit228ea6881b56a335de11cdf11f26853c33cc8336 (patch)
treee7e9a166a0fc7dbac3bf15736edb45ab04900330
parentae1e22b64d0368b88d8e81167da9c63a7937e9b0 (diff)
downloadorg-mode-228ea6881b56a335de11cdf11f26853c33cc8336.tar.gz
lisp/org.el (org-set-tags): Calculate width of tags with string-width
* lisp/org.el (org-set-tags): Width of strings presenting on a buffer should be calculated with `string-width' instead of `length'. This fixes unaligned tags for the languages with multi-width characters. TINYCHANGE
-rw-r--r--lisp/org.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 610c506..03c662d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14543,7 +14543,7 @@ With prefix ARG, realign all tags in headings in the current buffer."
0)
p0 (if (equal (char-before) ?*) (1+ (point)) (point))
tc (+ org-tags-column (if (> org-tags-column 0) (- di) di))
- c1 (max (1+ c0) (if (> tc 0) tc (- (- tc) (length tags))))
+ c1 (max (1+ c0) (if (> tc 0) tc (- (- tc) (string-width tags))))
rpl (concat (make-string (max 0 (- c1 c0)) ?\ ) tags)))
(replace-match rpl t t)
(and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point)))
@@ -20403,7 +20403,7 @@ If `org-special-ctrl-o' is nil, just call `open-line' everywhere."
(open-line n))
((org-at-table-p)
(org-table-insert-row))
- (t
+ (t
(open-line n))))
(defun org-return (&optional indent)