https://bugs.kde.org/show_bug.cgi?id=474505

            Bug ID: 474505
           Summary: Kate auto-detects wrong indentation
    Classification: Applications
           Product: kate
           Version: 23.08.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: indentation
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: kloec...@kde.org
  Target Milestone: ---

Created attachment 161612
  --> https://bugs.kde.org/attachment.cgi?id=161612&action=edit
Markdown file for which Kate auto-detects indentation width 7

For the attached file Kate auto-detects an indentation of 7. I think it
shouldn't assume any indentation width for this file and instead use the
default.

STEPS TO REPRODUCE
1. Enable "Automatically detect file indentation"
2. Open the attached file

OBSERVED RESULT
Kate automatically sets indentation to 7. Shows "Soft Tabs: 7 (4)" in the
status bar.

EXPECTED RESULT
Kate uses standard indentation, i.e. 4.

Even though the file ends with many lines which seem to suggest an indentation
of 7, there are many other lines which suggest indentations of 4, 12, 32. I
think, in case of an indentation histogram with multiple peaks without a common
divisor, Kate shouldn't assume a non-standard indentation. Or it should switch
from fixed width indentation to "smart indentation" (i.e. indentation based on
the next non-empty line above the cursor).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to