]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak sorting indicator placement in vtable
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 15 Apr 2022 11:45:00 +0000 (13:45 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 15 Apr 2022 11:45:00 +0000 (13:45 +0200)
* lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Tweak
sorting indicator position.

lisp/emacs-lisp/vtable.el

index ec7e4b4a6b915adf3aaa6205e57ec3e5cfc817af..d620f237266b9a7b95cbf93a84dec56dbab4dc4a 100644 (file)
@@ -645,7 +645,10 @@ This also updates the displayed table."
                 (+ (- (elt widths index)
                       (string-pixel-width displayed)
                       indicator-width
-                      (vtable-separator-width table))
+                      (vtable-separator-width table)
+                      ;; We want the indicator to not be quite flush
+                      ;; right.
+                      (/ (vtable--char-width table) 2.0))
                    (if last 0 spacer))))
            (if (or (not last)
                    (zerop indicator-width)
@@ -674,6 +677,10 @@ This also updates the displayed table."
                                   (list (- fill-width pre-fill))))))))
          (when (and divider (not last))
            (insert (propertize divider 'keymap dmap)))
+         (insert (propertize
+                  " " 'display
+                  (list 'space :width (list
+                                       (/ (vtable--char-width table) 2.0)))))
          (put-text-property start (point) 'vtable-column index)))
      (vtable-columns table))
     (insert "\n")