Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Python, writing else: unindents it automatically #23685

Closed
1 task done
evtn opened this issue Jan 26, 2025 · 2 comments
Closed
1 task done

In Python, writing else: unindents it automatically #23685

evtn opened this issue Jan 26, 2025 · 2 comments
Labels
duplicate Additional reports of an existing issue

Comments

@evtn
Copy link

evtn commented Jan 26, 2025

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Suppose I am at this position:

def cool_conditional(cond: bool):
    if cond:
        print("cool")

    | # cursor here

If I then write else:, this happens at the moment I press ::

def cool_conditional(cond: bool):
    if cond:
        print("cool")

else:| # cursor here

From my testing, similar effect (single level unindent) also happens in this configuration:

def cool_conditional(cond: bool):
    if cond:
        print("cool")
        | # cursor here

And this:

def cool_conditional(cond: bool):
    if cond:
        print("cool")
        
        | # cursor here

But not this:

def cool_conditional(cond: bool):
    if cond:
        print("cool")
    | # cursor here

Zed Version and System Specs

Zed: v0.170.2 (Zed)
OS: Linux Wayland arch unknown
Memory: 56.7 GiB
Architecture: x86_64
GPU: AMD Radeon Graphics (RADV GFX1103_R1) || radv || Mesa 24.3.4-arch1.1

If applicable, add screenshots or screencasts of the incorrect state / behavior

No response

If applicable, attach your Zed.log file to this issue.

@percontation
Copy link

percontation commented Jan 29, 2025

@notpeter
Copy link
Member

Closing as duplicate of:

@notpeter notpeter added the duplicate Additional reports of an existing issue label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Additional reports of an existing issue
Projects
None yet
Development

No branches or pull requests

4 participants