mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 01:28:24 +02:00
with the release of rust 1.67, let's bump to 1.66.1 (#7866)
# Description This PR bumps the required rust version to 1.66.1. # User-Facing Changes # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
This commit is contained in:
@ -484,14 +484,14 @@ fn set_cursor_cmd_bar(f: &mut Frame, area: Rect, pager: &Pager) {
|
||||
let next_pos = (pager.cmd_buf.buf_cmd2.len() + 1) as u16;
|
||||
// 1 skips a ':' char
|
||||
if next_pos < area.width {
|
||||
f.set_cursor(next_pos as u16, area.height - 1);
|
||||
f.set_cursor(next_pos, area.height - 1);
|
||||
}
|
||||
} else if pager.search_buf.is_search_input {
|
||||
// todo: deal with a situation where we exceed the bar width
|
||||
let next_pos = (pager.search_buf.buf_cmd_input.len() + 1) as u16;
|
||||
// 1 skips a ':' char
|
||||
if next_pos < area.width {
|
||||
f.set_cursor(next_pos as u16, area.height - 1);
|
||||
f.set_cursor(next_pos, area.height - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ impl Widget for ColoredTextW<'_> {
|
||||
let text = block.text();
|
||||
let style = style_to_tui(block.style());
|
||||
|
||||
let x = area.x + offset as u16;
|
||||
let x = area.x + offset;
|
||||
let (o, _) = buf.set_stringn(x, area.y, text, area.width as usize, style);
|
||||
|
||||
offset = o
|
||||
|
@ -112,10 +112,10 @@ impl View for InteractiveView<'_> {
|
||||
f.render_widget(cmd_input, cmd_input_area);
|
||||
|
||||
if !self.view_mode {
|
||||
let cur_w = area.x + 1 + 1 + 1 + max_cmd_len as u16;
|
||||
let cur_w = area.x + 1 + 1 + 1 + max_cmd_len;
|
||||
let cur_w_max = area.x + 1 + 1 + 1 + area.width - 2 - 1 - 1 - 1 - 1;
|
||||
if cur_w < cur_w_max {
|
||||
f.set_cursor(area.x + 1 + 1 + 1 + max_cmd_len as u16, area.y + 1);
|
||||
f.set_cursor(area.x + 1 + 1 + 1 + max_cmd_len, area.y + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -705,7 +705,7 @@ fn repeat_vertical(
|
||||
let span = Span::styled(text, style);
|
||||
|
||||
for row in 0..height {
|
||||
buf.set_span(x_offset, y_offset + row as u16, &span, width);
|
||||
buf.set_span(x_offset, y_offset + row, &span, width);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user