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:
Lukas Wirth
2025-09-27 00:13:16 +02:00
committed by GitHub
parent 837f282f1e
commit fbdf5d4df4
4 changed files with 17 additions and 15 deletions
@@ -170,6 +170,7 @@ pub struct LanguageSettingsContent {
/// How many columns a tab should occupy.
///
/// Default: 4
#[schemars(range(min = 1, max = 128))]
pub tab_size: Option<NonZeroU32>,
/// Whether to indent lines using tab characters, as opposed to multiple
/// spaces.