[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tab width oddity
From: |
Nate Bargmann |
Subject: |
Re: Tab width oddity |
Date: |
Wed, 24 Sep 2014 03:13:07 +0000 (UTC) |
User-agent: |
Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) |
On Wed, 24 Sep 2014 01:20:14 +0200, Emanuel Berg wrote:
> This is difficult to understand. Can you include the code that behaves
> strange so I (we) can try to reproduce it?
I am not certain if the news server I am on will pass the attachment.
The file is available from:
https://github.com/N0NB/hamlib/blob/master/rotorez/rotorez.c
The interesting segment is from lines 320 through 326, although more
exist throughout the file. Lines 322 and 323 show the effect I am only
seeing in Emacs.
For comparison, I have posted screen shots. The first is Emacs in a
terminal window with whitespace-mode on. In both of the following shots
the tab highlighting character is in the correct position after the '='
character but then nine positions are added instead of one:
http://i197.photobucket.com/albums/aa106/N0NB/Misc/emacs-term.jpg
This is Emacs running in its own X session also with whitespace-mode on:
http://i197.photobucket.com/albums/aa106/N0NB/Misc/emacs-gui.jpg
This is Midnight Commander using its internal editor highlighting the
white space. The cursor is on line 322 and only the right arrow of the
tab highlighting sequence is visible. The assignment operand is properly
lined up:
http://i197.photobucket.com/albums/aa106/N0NB/Misc/mc-term.jpg
And Vim (I didn't have the command handy to show white space):
http://i197.photobucket.com/albums/aa106/N0NB/Misc/vim-term.jpg
Finally, the file printed in the terminal window using cat:
http://i197.photobucket.com/albums/aa106/N0NB/Misc/cat-term.jpg
As I see it, Emacs is the one in error here as Midnight Commander, Vim,
cat, and the GitHub Web interface (along with Git tools) agree on the
formatting. Only Emacs seems to be processing the case where the tab
only occupies one space of screen position incorrectly.
HTH,
- Nate