Giter Site home page Giter Site logo

Comments (4)

jerrypnz avatar jerrypnz commented on September 24, 2024 1

Ha you ran into the exact same issue I had. I initially thought it's a bug in pretty-hydra but as you mentioned, there is no problem when using lv display type (the extra new line at the end is also displayed as your screenshot shows). I was able to reproduce the issue with a simple posframe-show call.

(posframe-show "*test-posframe*" :string "\n foo \n bar \n foobar \n" :internal-border-width 1 :internal-border-color "red")

and I saw two problems:

  • Not all content is displayed when there are leading/trailing spaces on each line (which is the case for pretty hydra hints)
  • No matter how many new lines I put at the end, it didn't affect the height at all

It seems to be an issue in fit-frame-to-buffer which posframe uses to resize the frame.

I got around it by forking hydra-posframe and adding an ugly hack: jerrypnz/hydra-posframe@7a0506b

from major-mode-hydra.el.

neh avatar neh commented on September 24, 2024

Glad to know it's not just me. I was finding it messy to use the hydra-posframe package, and it turns out not to be necessary any more anyway, so I removed it and adapted your workaround (eg. pasted it with one small modification) into hydra-posframe-show in the hydra package and that's working ok. It's unfortunately slow (I can see it adjust the frame size) and of course, it's a messy hack ;-). Is there a path to a real fix here? Is it a matter of digging through fit-frame-to-buffer to try and sort it out?

from major-mode-hydra.el.

jerrypnz avatar jerrypnz commented on September 24, 2024

For me it feels fast enough and I never saw it adjust the size. I didn't get a chance to further dig into it but might be worth reproducing the issue with a minimal config and report a bug for posframe?

from major-mode-hydra.el.

jerrypnz avatar jerrypnz commented on September 24, 2024

Closing it as it's not really an issue of pretty-hydra.

from major-mode-hydra.el.

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.