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

Auto-indenting of braces breaks inside quotes #9067

Closed
jw013 opened this issue Dec 13, 2023 · 1 comment
Closed

Auto-indenting of braces breaks inside quotes #9067

jw013 opened this issue Dec 13, 2023 · 1 comment
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue

Comments

@jw013
Copy link
Contributor

jw013 commented Dec 13, 2023

Summary

Auto-indenting breaks inside quotes for most file types.

Reproduction Steps

Baseline: plain text file

  • hx foo.txt
  • enter Insert mode
  • type a<space>{<enter>b<space>{<enter>c<space>{<enter>.

Result

a {
    b {
        c {
            | <- cursor is here
        }
    }
}

This seems perfectly normal.

Rust

  • hx foo.rs
  • prepare the following
    const S: &str = "
    | <- place cursor here in insert mode
    ";
    
  • type the same a { b { c { sequence as above

Result

const S: &str = "
a {
    b {
    c {
    | <- cursor 
}
}
}
";

This issue is not specific to rust, I initially ran into it trying to edit a large multi-line string in a .ron file. Similar behavior can be reproduced with .py and .js:

hx foo.py results:

"""
a {
    b {
    c {
    
}
}
}
"""

hx foo.js results:

`
a {
  b {
  c {
  
}
}
}
`

Helix log

No response

Platform

Linux

Terminal Emulator

gnome-terminal

Installation Method

source

Helix Version

helix 23.10 (cb0bc25)

@jw013 jw013 added the C-bug Category: This is a bug label Dec 13, 2023
@kirawi
Copy link
Member

kirawi commented Dec 13, 2023

This seems like a duplicate of #6939

@kirawi kirawi closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
@kirawi kirawi added the R-duplicate Duplicated issue: please refer to the linked issue label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue
Projects
None yet
Development

No branches or pull requests

2 participants