Bug 487054

Summary: Unexpected space indentation in Go var group
Product: [Applications] kate Reporter: Aljosha <aljosha.papsch>
Component: indentationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 24.02.1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Reproducer

Description Aljosha 2024-05-15 11:58:44 UTC
Created attachment 169503 [details]
Reproducer

SUMMARY

Indentation uses spaces after inserting a line break in a var group (Go language), inside a multiline definition, i.e. map.

STEPS TO REPRODUCE
1. In a var() group, define a map[string]string{} variable.
2. Define a key/value pair in the map on its own line.
3. After the comma character of the key/value pair, press Enter.

OBSERVED RESULT

The cursor is placed on a new line with 5 space characters.

EXPECTED RESULT

The cursor is placed on a new line with 2 tab characters.

SOFTWARE/OS VERSIONS
Windows: 11 Version 23H2 (x86_64)
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION

See the attached reproducer.
Comment 1 Bug Janitor Service 2024-09-30 06:26:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/736
Comment 2 Waqar Ahmed 2024-10-03 14:11:28 UTC
Git commit 9113274ad58fb588d5b6e30d98446495fec591b2 by Waqar Ahmed.
Committed on 01/10/2024 at 08:15.
Pushed by cullmann into branch 'master'.

Fix unexpected space indentation in Go var group

A  +13   -0    autotests/input/indent/cstyle/openpar13/expected
A  +4    -0    autotests/input/indent/cstyle/openpar13/input.js
A  +11   -0    autotests/input/indent/cstyle/openpar13/origin
M  +9    -7    src/script/data/indentation/cstyle.js

https://invent.kde.org/frameworks/ktexteditor/-/commit/9113274ad58fb588d5b6e30d98446495fec591b2