walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
652 stars 18 forks source link

Wrapping long words eats up one character #250

Open lapo-luchini opened 6 days ago

lapo-luchini commented 6 days ago
% seq -s '' 100 199 | moar -wrap
  1 10010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213
    13413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616
    168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
---

First line ends with "130 131 132 13[3]" second line starts with "134 135".

Also with different terminal width, still skipping last char on each line:

  1 1001011021031041051061071081091101111121131141151161171181191     0121122123124125126127128129130131132133134135136137138139140     4114214314414514614714814915015115215315415515615715815916016     1621631641651661671681691701711721731741751761771781791801811     2183184185186187188189190191192193194195196197198199
---
walles commented 6 days ago

I failed to repro this with moar v1.27.2 and iTerm2 3.5.5 (see below).

  1. What does moar --version say?
  2. What terminal program are you using? Does it repro if you try some other terminal?
Skärmavbild 2024-10-09 kl  06 58 16
lapo-luchini commented 6 days ago

I was using v1.27.0 but upgrading to .2 doesn't solve it. I'm using Windows Terminal, which is usually a good terminal (at least, I never had problems with tmux and mosh), but only now I noticed that the rightmost three columns (and last line) are completely black. This is with seq -s '-' 10 99 | moar -wrap (which is more readable): image opening it inside tmux solves the problem while still having two black columns… I guess those are the culprit: image

lapo-luchini commented 6 days ago

Ok, no, the blank columns/line seems to be because of HiDPI scaling, but the "missing letters column" (which goes away inside tmux) is I guess a separate issue. 🤔

walles commented 4 days ago

To rule out Windows specific issues in moar, would it be possible for you to try this with some other terminal app on Windows?

That would tell us whether this is:

  1. moar doing something strange on WIndows
  2. Windows Terminal doing something strange with moar's printouts

I have tried this (on macOS) and it works in:

Unfortunately Windows Terminal requires Windows, and since I'm on macOS that makes this tricky for me to troubleshoot.