[gedit] Flush the doc stream to ensure proper line end detection.



commit ee697bfad740d814638fe705e82223b384347376
Author: Paolo Borelli <pborelli gnome org>
Date:   Tue Nov 9 00:04:17 2010 +0100

    Flush the doc stream to ensure proper line end detection.

 gedit/gedit-document-loader.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-document-loader.c b/gedit/gedit-document-loader.c
index ca52a87..22724dd 100644
--- a/gedit/gedit-document-loader.c
+++ b/gedit/gedit-document-loader.c
@@ -624,6 +624,9 @@ async_read_cb (GInputStream *stream,
 	/* end of the file, we are done! */
 	if (async->read == 0)
 	{
+		/* flush the stream to ensure proper line ending detection */
+		g_output_stream_flush (loader->priv->output, NULL, NULL);
+
 		loader->priv->auto_detected_encoding =
 			gedit_smart_charset_converter_get_guessed (loader->priv->converter);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]