On 24.04.2011 02:59, Ryan J Ollos wrote:
> I was converting tabs to whitespace throughout my codebase today and made a
> couple of observations when reviewing changes.
> 1. Tabs are shown as having varying length:
> Here are two lines from a diff viewed in vim with `:set list` on:
> mxaParams, parentName, "EstimationType" ) );$
> mxaParams, parentName, "Direction" ) );$
> Here is the view on the lhs of TMerge:
> Why are the single tab characters displayed as having length 1 and 2 spaces,
Because a tab stops at specific columns. Example:
if you add a tab after the last char in each of the above lines, you
will end up in column 4 (if the tab space is set to four, which it is in
So in the first line, the tab would be displayed as three chars wide,
two chars wide in the second line and one char wide in the third line.
> 2. In the previous example, 'Ignore whitespace changes' was selected. I'm
> seeing several cases were the only changes are tab -> whitespace conversions
> and these are displayed as changes in the viewer. However these are
> *usually* ignored when 'Ignore whitespace changes' is selected.
> The 'ignore' setting does not have an affect when the tab to whitespace
> changes are not at the beginning of the line. In (1), there are tab to
> whitespace changes in the middle of the line. Here is another example where
> the tab to whitespace changes are at the end of the line.
> -^I^Iconst bool axisIsVisibleY = mxGetPropertyAsBool( mxDisplay,
> parentName, "AxisIsVisibleY", i );^I^I $
> TMerge lhs:
> TMerge rhs:
There are two settings to ignore whitespaces. The "ignore whitespace
changes" will ignore changes at the beginning or end of lines, and
"ignore all whitespace changes" will also ignore them in the middle of
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-04-24 08:35:56 CEST