[gedit/docstream2: 8/16] Skip unneeded iteration after partial read
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit/docstream2: 8/16] Skip unneeded iteration after partial read
- Date: Sat, 23 Jan 2010 13:30:50 +0000 (UTC)
commit b6fdf6dfbd1cc76ad735e2d18b519f8257e444c1
Author: Jesse van den Kieboom <jesse icecrew nl>
Date: Sat Jan 23 12:35:07 2010 +0100
Skip unneeded iteration after partial read
gedit/gedit-document-input-stream.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-document-input-stream.c b/gedit/gedit-document-input-stream.c
index 7089711..08a3ff4 100644
--- a/gedit/gedit-document-input-stream.c
+++ b/gedit/gedit-document-input-stream.c
@@ -391,7 +391,7 @@ gedit_document_input_stream_read (GInputStream *stream,
n = read_line (dstream, buffer + read, space_left);
read += n;
space_left -= n;
- } while (space_left > 0 && n != 0);
+ } while (space_left > 0 && n != 0 && dstream->priv->bytes_partial == 0);
/* make sure files are always terminated with \n (see bug #95676). Note
that we strip the trailing \n when loading the file */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]