A crazy idea for accurately tracking source position

matovitch via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 17 12:20:48 PDT 2014


You are doing it all wrong. The easiest way to compute
the col position is the following :

col_pos = 0;

if (non_tab_character_encounter)
      col_pos++;
else
      col_pos += tab_length - col_pos % tab_length;

That's it.


More information about the Digitalmars-d mailing list