Commit b5061c5 1 parent 359204c commit b5061c5 Copy full SHA for b5061c5
File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ unicode-segmentation = "1.10"
39
39
unicode-width = " 0.1"
40
40
document-features = { version = " 0.2.7" , optional = true }
41
41
lru = " 0.12.0"
42
- stability = " 0.1.1 "
42
+ stability = " 0.2.0 "
43
43
compact_str = " 0.7.1"
44
44
45
45
[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -256,6 +256,8 @@ impl<'a> Paragraph<'a> {
256
256
/// need in order to be fully rendered. For paragraphs that do not use wrapping, this count is
257
257
/// simply the number of lines present in the paragraph.
258
258
///
259
+ /// Note: The design for text wrapping is not stable and might affect this API.
260
+ ///
259
261
/// # Example
260
262
///
261
263
/// ```ignore
@@ -267,7 +269,6 @@ impl<'a> Paragraph<'a> {
267
269
/// ```
268
270
#[ stability:: unstable(
269
271
feature = "rendered-line-info" ,
270
- reason = "The design for text wrapping is not stable and might affect this API." ,
271
272
issue = "https://github.com/ratatui-org/ratatui/issues/293"
272
273
) ]
273
274
pub fn line_count ( & self , width : u16 ) -> usize {
@@ -297,6 +298,8 @@ impl<'a> Paragraph<'a> {
297
298
298
299
/// Calculates the shortest line width needed to avoid any word being wrapped or truncated.
299
300
///
301
+ /// Note: The design for text wrapping is not stable and might affect this API.
302
+ ///
300
303
/// # Example
301
304
///
302
305
/// ```ignore
@@ -309,7 +312,6 @@ impl<'a> Paragraph<'a> {
309
312
/// ```
310
313
#[ stability:: unstable(
311
314
feature = "rendered-line-info" ,
312
- reason = "The design for text wrapping is not stable and might affect this API." ,
313
315
issue = "https://github.com/ratatui-org/ratatui/issues/293"
314
316
) ]
315
317
pub fn line_width ( & self ) -> usize {
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ fn widgets_paragraph_can_wrap_with_a_trailing_nbsp() {
99
99
#[ test]
100
100
fn widgets_paragraph_can_scroll_horizontally ( ) {
101
101
let text =
102
- Text :: from ( "段落现在可以水平滚动了!\n Paragraph can scroll horizontally!\n Short line" ) ;
102
+ Text :: from ( "段落现在可以水平滚动了!\n Paragraph can scroll horizontally!\n Little line" ) ;
103
103
let paragraph = Paragraph :: new ( text) . block ( Block :: default ( ) . borders ( Borders :: ALL ) ) ;
104
104
105
105
test_case (
@@ -108,7 +108,7 @@ fn widgets_paragraph_can_scroll_horizontally() {
108
108
"┌──────────────────┐" ,
109
109
"│在可以水平滚动了!│" ,
110
110
"│ph can scroll hori│" ,
111
- "│ine │" ,
111
+ "│line │" ,
112
112
"│ │" ,
113
113
"│ │" ,
114
114
"│ │" ,
@@ -124,7 +124,7 @@ fn widgets_paragraph_can_scroll_horizontally() {
124
124
"┌──────────────────┐" ,
125
125
"│段落现在可以水平滚│" ,
126
126
"│Paragraph can scro│" ,
127
- "│ Short line│" ,
127
+ "│ Little line│" ,
128
128
"│ │" ,
129
129
"│ │" ,
130
130
"│ │" ,
You can’t perform that action at this time.
0 commit comments