Skip to content

[BUG] With Python auto-indent, lines following a comment line should not be smart-indented #15528

@alankilborn

Description

@alankilborn

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

In Python, I often create a comment like the one shown here on line 1:

image

The comment describes what is happening on the next line, so I "form that connection" with a colon (:) at the end of the comment line.

Unfortunately, with the advent of Python smart-indent resulting from #15122, the colon at the end of the comment line will cause the following line to be indented when Enter is pressed after the colon:

image

Ideally, since the comment line isn't executable code, the colon at its end should not trigger smart auto-indent on the following line.

Steps To Reproduce

See Description above.

Current Behavior

image

Expected Behavior

image

Debug Information

Notepad++ v8.6.9   (64-bit)
Build time : Jul 12 2024 - 05:09:25
Path : C:\NotepadPlusPlus\Misc\_NoBackup\Releases\npp.8.6.9\npp.8.6.9.portable.x64\notepad++.exe
Command Line : -titleAdd="8.6.9 64-bit" -multiInst
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 11 Pro (64-bit)
OS Version : 23H2
OS Build : 22631.3880
Current ANSI codepage : 1252
Plugins : 
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)
    PythonScript (3.0.18)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions