Hi!
Here is my small sample file (indent unit is 4 spaces):
-- -- -- -- $ cat indent_width.cpp // Indent width, detect from content: 8 (wrong). Delete any line. Indent width, detect from content: 4 (good). namespace S { int z () { int i = 0; char c = 2; double d = 2.4; d *= c; return d + i; } } -- -- -- --
In Geany, the default indent at me is 4 spaces.
Open the indent_width.cpp in Geany, issue an "Indent Width / Detect from Content" command. The indent is now (erroneously) 8 spaces!
Now try deleting a line (for example the "double d = 2.4;"). Repeat the autodetection: "Indent Width / Detect from Content". The indent is now (correctly) 4 spaces.
Geany's version is: 1.23.1 (current distributed (repository-ed) version).