NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/56496: etcupdate(8) merge formatting issue



The following reply was made to PR bin/56496; it has been noted by GNATS.

From: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/56496: etcupdate(8) merge formatting issue
Date: Tue, 16 Nov 2021 06:42:08 +0000 (UTC)

 On Tue, 16 Nov 2021, Robert Elz wrote:
 
 > You're assuming it is sdiff doing that, and from Hauke's messages, diff as
 > well - I doubt either of those is expanding tabs (though for sdiff, at least
 > on the left side, it might make some sense).
 >
 > But I have seen this happen with printf sending test, and a tab at a position
 > beyond column 80.   Definitely no diff related commands involved, and printf
 > is most certainly not trying to expand tabs.
 >
 > That stty oxtabs makes a difference is also revealing.
 >
 >   |  Hauke, can you post/email your sdiff binary amd the outputs of a: `locale'
 >   |  and `infocmp'?
 >
 > You can if you want, but none of that will reveal anything useful.
 >
 
 You're right. It's xterm after all--I can reproduce that screenshot
 exactly:
 
 1. Start an 80x25 xterm:
 
 $ xterm -g 80x25
 
     That dimension is important.
 
 2. Set explicit 8-column tab stops (using tabs(1) for instance):
 
 $ tabs
 
     Now tabs are set at 0, 8, 16, ... 80 (_only_)
 
 3. Resize xterm to make it wider. Last tab position is still only
     at 80.
 
 4. Run our familiar sdiff cmd. line.
     Now in the second changeset (the RHS one), the if a tab char.
     is encountered past col 80 (very likely), and if `-oxtabs' is
     set, xterm will advance to the next tab position on that line:
     (which defaults to) the _last column_ on that line. The rest of
     the RHS line will get printed from there and will follow the
     same tab-columnation pattern.
 
 Solution:
 
 Don't set explicit tab positions (wherever it is being set, however
 it is being set--tabs(1), tset(1), ...).
 
 Or, "Do Full Reset" in xterm--as kre@ suggested, or run `reset' after
 resizing.
 
 -RVP
 


Home | Main Index | Thread Index | Old Index