]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix off-by-one error in mode-line-compact code
authorAmin Bandali <bandali@gnu.org>
Mon, 4 Jan 2021 09:48:08 +0000 (10:48 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 4 Jan 2021 09:48:08 +0000 (10:48 +0100)
* src/xdisp.c (display_mode_line): Fix off-by-one error that would
chop off the final non-space character when compacting (bug#45646).

src/xdisp.c

index 43447e2bf7ee2bc1036828e4e83962366f876e19..6a4304d194b875c0b80f367dcda3de01fce87187 100644 (file)
@@ -25504,7 +25504,7 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format)
          if (start < i)
            display_string (NULL,
                            Fsubstring (mode_string, make_fixnum (start),
-                                       make_fixnum (i - 1)),
+                                       make_fixnum (i)),
                            Qnil, 0, 0, &it, 0, 0, 0,
                            STRING_MULTIBYTE (mode_string));
        }