Hi list,
On Thu, 7 Jun 2007 17:13:59 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 07 Jun 2007 11:12:07 +0200, Harold Aling h.aling@home.nl wrote:
Hi all,
you are right. Anyway, the current code for replacing tabs isn't buggy. It works as intended only the indention is a bit buggy. What I want to say, I wasn't aware of this problem but I agree that it should be improved to not only stupidly replace any tab by some spaces with the amount of tab_width.
After some tests I'd reckon that the best solution will be:
"if spaces are followed by a tab then { if (no. of spaces < tabWidthInSpaces) then discard spaces }"
Sounds good.
Err, no. The solution is to use sci_get_col_from_position modulo tab_len to determine how many spaces the current \t is worth.
But I won't work on this, at least not in the near future.
Any patches are welcome. If anyone want to work on this, the start should be document_replace_tabs() in src/document.c:1802.
Patch attached & validated against the attached test file and sonata.py with tab_len = 8.
Many thanks for doing Geany.
François Cami & Guillaume Duviol