fmt: fix formating a file in an oscillating manner (fix #22223, fix #22026) (#22232)

This commit is contained in:
yuyi 2024-09-17 14:47:38 +08:00 committed by GitHub
parent c004d0c899
commit acf6b344f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
99 changed files with 681 additions and 655 deletions

View file

@ -57,9 +57,9 @@ fn frame(mut app App) {
description: 'Hello! This should show an *animated* example application description.
We are at frame ${app.frame}.
Press ESCAPE or Ctrl+C to exit'
footer: '
footer: '
Press ESCAPE or Ctrl+C to exit'
fields: {
fields: {
'level': 'Level of lorem ipsum\nand more\nmany many many more.\nNotice how user newlines/format is kept since\ninput lines are all less or within\nthe default layout.description_padding\nand max width'
'example': 'Looong example text without newlines or anything else and lorem ipsum and more and many many many more. Should be auto fitted'
'multi': 'This flag can be repeated'

View file

@ -209,11 +209,11 @@ Editing property: ${app.edit}, value: ${value}')
help_text := flag.to_doc[DocTest](
description: 'Simple DocLayout editor.
Press ESCAPE or Ctrl+C to exit and print layout code'
footer: '
footer: '
Press ESCAPE or Ctrl+C to exit and print layout code'
fields: unsafe { field_docs }
layout: app.layout
options: app.options
fields: unsafe { field_docs }
layout: app.layout
options: app.options
) or { '' }
app.tui.draw_text(0, 5, '${help_text}')