mirror of
https://github.com/openai/codex.git
synced 2026-09-17 12:23:33 +00:00
Merge 66a5929082 into sapling-pr-archive-bolinfest
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use shlex;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct ZshShell {
|
||||
shell_path: String,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use unicode_width::UnicodeWidthChar;
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
|
||||
/// A single visual row produced by RowBuilder.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
@@ -10,7 +9,9 @@ pub struct Row {
|
||||
}
|
||||
|
||||
impl Row {
|
||||
#[cfg(test)]
|
||||
pub fn width(&self) -> usize {
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
self.text.width()
|
||||
}
|
||||
}
|
||||
@@ -39,6 +40,7 @@ impl RowBuilder {
|
||||
self.target_width
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn set_width(&mut self, width: usize) {
|
||||
self.target_width = width.max(1);
|
||||
// Rewrap everything we have (simple approach for Step 1).
|
||||
@@ -87,6 +89,7 @@ impl RowBuilder {
|
||||
}
|
||||
|
||||
/// Return a snapshot of produced rows (non-draining).
|
||||
#[cfg(test)]
|
||||
pub fn rows(&self) -> &[Row] {
|
||||
&self.rows
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user