editor: Do not panic on tab_size > 16, cap it at 128 (#38994)
Fixes ZED-1PT Fixes ZED-1PW Fixes ZED-1G2 Release Notes: - Fixed Zed panicking when the `tab_size` is set higher than 16
This commit is contained in:
@@ -749,6 +749,7 @@ pub struct LanguageConfig {
|
||||
pub hard_tabs: Option<bool>,
|
||||
/// How many columns a tab should occupy.
|
||||
#[serde(default)]
|
||||
#[schemars(range(min = 1, max = 128))]
|
||||
pub tab_size: Option<NonZeroU32>,
|
||||
/// How to soft-wrap long lines of text.
|
||||
#[serde(default)]
|
||||
@@ -845,6 +846,7 @@ pub struct BlockCommentConfig {
|
||||
/// A character to add as a prefix when a new line is added to a block comment.
|
||||
pub prefix: Arc<str>,
|
||||
/// A indent to add for prefix and end line upon new line.
|
||||
#[schemars(range(min = 1, max = 128))]
|
||||
pub tab_size: u32,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user