summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Monnerat <[email protected]>2015-10-09 13:57:06 +0200
committerraveit65 <[email protected]>2015-10-13 14:07:00 +0200
commit90fa9b31bb87135c23253074c7d437896b6698f8 (patch)
tree54d6f08f9acf59cf05134d29da6e840e9d510f69
parent7ec8b4d7450b7a4558822d1c3f8fbe178e505690 (diff)
downloadpluma-90fa9b31bb87135c23253074c7d437896b6698f8.tar.bz2
pluma-90fa9b31bb87135c23253074c7d437896b6698f8.tar.xz
Flush document output data at EOF before determining the loader newline type.pluma-1.11.0
Failure to do so fails determining the newline type for a single line ending with CR.
-rw-r--r--pluma/pluma-gio-document-loader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pluma/pluma-gio-document-loader.c b/pluma/pluma-gio-document-loader.c
index c8a59d62..c1377578 100644
--- a/pluma/pluma-gio-document-loader.c
+++ b/pluma/pluma-gio-document-loader.c
@@ -389,6 +389,10 @@ async_read_cb (GInputStream *stream,
loader = PLUMA_DOCUMENT_LOADER (gvloader);
+ g_output_stream_flush (gvloader->priv->output,
+ NULL,
+ &gvloader->priv->error);
+
loader->auto_detected_encoding =
pluma_smart_charset_converter_get_guessed (gvloader->priv->converter);