{"record":{"id":"f134030d521c80de","repo":"sxyazi/yazi","slug":"offset-height-must-be-at-least-3","errorCode":null,"errorMessage":"offset height must be at least 3: {:?}","messagePattern":"offset height must be at least 3: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-binding/src/position/offset.rs","lineNumber":35,"sourceCode":"\t\t\ty:      value.y as i16,\n\t\t\twidth:  value.width,\n\t\t\theight: value.height,\n\t\t}\n\t}\n}\n\nimpl TryFrom<[i16; 4]> for Offset {\n\ttype Error = anyhow::Error;\n\n\tfn try_from(values: [i16; 4]) -> Result<Self, Self::Error> {\n\t\tif values.len() != 4 {\n\t\t\tbail!(\"offset must have 4 values: {:?}\", values);\n\t\t}\n\t\tif values[2] < 0 || values[3] < 0 {\n\t\t\tbail!(\"offset width and height must be positive: {:?}\", values);\n\t\t}\n\t\tif values[3] < 3 {\n\t\t\tbail!(\"offset height must be at least 3: {:?}\", values);\n\t\t}\n\n\t\tOk(Self {\n\t\t\tx:      values[0],\n\t\t\ty:      values[1],\n\t\t\twidth:  values[2] as u16,\n\t\t\theight: values[3] as u16,\n\t\t})\n\t}\n}\n","sourceCodeStart":17,"sourceCodeEnd":46,"githubUrl":"https://github.com/sxyazi/yazi/blob/5f901b886b14de1f17460b6e52e9de5d67f8aba9/yazi-binding/src/position/offset.rs#L17-L46","documentation":"Validation in `TryFrom<[i16; 4]> for Offset`: the height (`values[3]`) is below 3. The layout code assumes a minimum pane height of 3 rows (e.g. borders plus a content line), so shorter offsets are rejected to avoid degenerate layouts.","triggerScenarios":"Thrown at yazi-binding/src/position/offset.rs:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the offset height to at least 3.","Re-check the computed preview rect if it derives from a very small terminal or pane."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5f901b886b14de1f17460b6e52e9de5d67f8aba9","analyzedAt":"2026-09-02T18:38:25.566Z","contentChangedAt":"2026-09-02T18:38:25.566Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}