ttscoff/mdless

In contrast to less: mdless doesn't adapt to changing view port of terminal

Closed this issue · 21 comments

As seen in the two screenshots less uses the full width of the terminal when the viewport is switched from portrait to landscape and mdless keeps the portrait formatting.

Thanks for a great app!

Unfortunately I cannot attach screenshots in GitHub mobile app.

Could you please fix this issue for gem package? It's annoying and doesn't offer "a replacement for less".

mdless calculates its line wrapping and code formatting based on the width of the screen at the time the command is run. There is no way to output what it does in a way that will wrap if the screen width is changed.

thank you for version 2.1.13!

Unfortunately I get a runtime error on Android termux, which was working fine on the previous version 1.0.37

Error is as follows:
console.rb:778:in '*': negative argument (Argument Error)

Please let me know if you need a stacktrace - I can send a screenshot, copy&pasta is a bit difficult on Android smartphone...

Thank you for version 2.1.23

I have a regression now:

Opening mdless already in landscape mode uses the landscape width only partly, cp. Screenshot

Screenshot_20231204-195932.png

Hello Brett,

deleting the line :width: from config.yml did the trick! Please remove it from auto saving, too.

Best regards
Gerrit

Thank you!

2.1.25 is breaking with runtime error

Screenshot_20231205-141907.png

Yes 2.1.26 fixed the error.

As you can see in the screenshot there are early line breaks:

  • in the table header before "email"
  • in between "79" and "days"
  • width is set to: 116

Screenshot_20231205-150010.png

Thank you for 2.1.28

The table headers and line break before "days" are fixed now.

But every line that had a line break before "days" has an extra empty line in the next row.

Can you please have a look?

Please provide the document containing the table you're working with. I haven't touched the wrapping functions at all yet, so any change you're seeing is unintentional.

error2.md

Please have a look...

Thank you @ttscoff !

the configuration of the screenwidth fixes this for me now! It is not calculated on the fly on my smartphone, but what the heck: I only use app Termux in landscape only! So I am more than satisfied with your app mdless! Keep up the good faith!

Gerrit