You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
running 1 test
thread 'widgets::block::tests::render_crash' panicked at src/buffer/buffer.rs:138:9:
Trying to access position outside the buffer: x=15, y=0, area=Rect { x: 0, y: 0, width: 15, height: 3 }
stack backtrace:
0: rust_begin_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
2: ratatui::buffer::buffer::Buffer::index_of
at ./src/buffer/buffer.rs:138:9
3: ratatui::buffer::buffer::Buffer::set_stringn
at ./src/buffer/buffer.rs:216:25
4: ratatui::buffer::buffer::Buffer::set_line
at ./src/buffer/buffer.rs:251:23
5: ratatui::widgets::block::Block::render_right_titles::{{closure}}
at ./src/widgets/block.rs:697:17
6: core::iter::traits::iterator::Iterator::for_each::call::{{closure}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:855:29
7: core::iter::adapters::filter::filter_fold::{{closure}}
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/adapters/filter.rs:40:44
8: core::iter::traits::double_ended::DoubleEndedIterator::rfold
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/double_ended.rs:307:21
9: <core::iter::adapters::filter::Filter<I,P> as core::iter::traits::double_ended::DoubleEndedIterator>::rfold
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/adapters/filter.rs:185:9
10: <core::iter::adapters::rev::Rev<I> as core::iter::traits::iterator::Iterator>::fold
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/adapters/rev.rs:64:9
11: core::iter::traits::iterator::Iterator::for_each
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:858:9
12: ratatui::widgets::block::Block::render_right_titles
at ./src/widgets/block.rs:683:9
13: ratatui::widgets::block::Block::render_title_position
at ./src/widgets/block.rs:708:9
14: ratatui::widgets::block::Block::render_titles
at ./src/widgets/block.rs:714:9
15: <ratatui::widgets::block::Block as ratatui::widgets::WidgetRef>::render_ref
at ./src/widgets/block.rs:532:9
16: <ratatui::widgets::block::Block as ratatui::widgets::Widget>::render
at ./src/widgets/block.rs:522:9
17: ratatui::widgets::block::tests::render_crash
at ./src/widgets/block.rs:1351:9
18: ratatui::widgets::block::tests::render_crash::{{closure}}
at ./src/widgets/block.rs:1349:22
19: core::ops::function::FnOnce::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
20: core::ops::function::FnOnce::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
test widgets::block::tests::render_crash ... FAILED
failures:
failures:
widgets::block::tests::render_crash
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1332 filtered out; finished in 0.08s
The text was updated successfully, but these errors were encountered:
- Simplified implementation of the rendering for block.
- Introduces a subtle rendering change where centered titles that are
odd in length will now be rendered one character to the left compared
to before. This aligns with other places that we render centered text
and is a more consistent behavior. See
#807 (comment)
for another example of this.
Fixes: #929
When rendering a block with a empty title with alignment right, I get a crash. Here's a minimal test:
Here's the stacktrace from the test:
The text was updated successfully, but these errors were encountered: