Flush document output data at EOF before determining the loader newline type.

Failure to do so fails determining the newline type for a single line ending
with CR.
This commit is contained in:
Patrick Monnerat 2015-10-09 13:57:06 +02:00 committed by raveit65
parent 7ec8b4d745
commit 90fa9b31bb
1 changed files with 4 additions and 0 deletions

View File

@ -389,6 +389,10 @@ async_read_cb (GInputStream *stream,
loader = PLUMA_DOCUMENT_LOADER (gvloader); loader = PLUMA_DOCUMENT_LOADER (gvloader);
g_output_stream_flush (gvloader->priv->output,
NULL,
&gvloader->priv->error);
loader->auto_detected_encoding = loader->auto_detected_encoding =
pluma_smart_charset_converter_get_guessed (gvloader->priv->converter); pluma_smart_charset_converter_get_guessed (gvloader->priv->converter);