Invoking Tidy from within Bluefish to pretty-print HTML usually works. Occasionally, however, the file disappears from the screen. No solution is known, but there are workarounds.
You know you have this problem if, when the file disappears from the screen, Bluefish prints to stdout:
Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)’ failed
This is a GTK issue, not a Bluefish or Tidy issue. One reference suggests that the affected files “must have some high ASCII chars in there”. I know of no solution other than to await a bugfix, but there are workarounds.
Ideally, hunt down and replace the offending characters. This is sometimes easier said than done.
Alternatively, if you pretty-print the offending file from the command line:
tidy -indent -latin1 -f /dev/null -wrap 72 -m filename.html
…filename.html will be overwritten with a pretty-printed version. Any subsequent invocation of Tidy on the same file will cause it to disappear, however.
Perhaps undecoded UTF-8 errors are related to this problem. Or maybe not.