Bug 487054 - Unexpected space indentation in Go var group
Summary: Unexpected space indentation in Go var group
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: indentation (show other bugs)
Version: 24.02.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-15 11:58 UTC by Aljosha
Modified: 2024-10-03 14:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Reproducer (229 bytes, text/plain)
2024-05-15 11:58 UTC, Aljosha
Details

Note You need to log in before you can comment on or make changes to this bug.
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