Coder Social home page Coder Social logo

Comments (2)

johnmwu avatar johnmwu commented on August 15, 2024 1

Digging a bit further, this definitely has to do with smart-mode-line. In sml/generate-minor-modes, there is:

(defun sml/generate-minor-modes ()
  "Extracts all rich strings necessary for the minor mode list."
  (if sml/simplified
      ""
    (let* (;; The minor-mode-alist
           (nameList (rm--mode-list-as-string-list))
           ;; The size available
           (size (max 0
                      (- (if (member sml/mode-width '(full right))
                             ;; Calculate how much width is available
                             (sml/fill-width-available)
                           ;; or use what the user requested.
                           sml/mode-width)
                         (string-width (format-mode-line
...

Here, size is the number of chars in the minor mode list. I believe there's a bug in the calculation of sml/fill-width-available, where it calculates a number that's far too high (so the global info is pushed off). Also, this computation uses window-total-width, which explains why alignment changes when splitting the window horizontally.

I was able to fix the issue of global info by

(setq sml/mode-width 40)

from emacs-mini-modeline.

kiennq avatar kiennq commented on August 15, 2024

Can you try with this (:eval (string-trim (format-mode-line mode-line-modes))) instead of mode-line-modes in mini-modeline-r-format?
And also try to remove mode-line-end-spaces too

from emacs-mini-modeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.