[latexila/wip/latexila-next] PostProcessorLatex: code clean-up



commit fa2f751c9e9e33be2404e1b76ab0996e0eb87fe9
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Sep 14 00:39:59 2014 +0200

    PostProcessorLatex: code clean-up
    
    Last thing done.

 src/liblatexila/latexila-post-processor-latex.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/liblatexila/latexila-post-processor-latex.c b/src/liblatexila/latexila-post-processor-latex.c
index d46c0b5..4de5149 100644
--- a/src/liblatexila/latexila-post-processor-latex.c
+++ b/src/liblatexila/latexila-post-processor-latex.c
@@ -150,7 +150,7 @@ set_line_buffer (LatexilaPostProcessorLatex *pp,
   if (pp->priv->line_buffer != NULL)
     g_string_free (pp->priv->line_buffer, TRUE);
 
-  pp->priv->line_buffer = g_string_new (new_content);
+  pp->priv->line_buffer = g_string_new (line);
   pp->priv->lines_count = 1;
 }
 
@@ -196,7 +196,7 @@ add_message (LatexilaPostProcessorLatex *pp,
       g_strcmp0 (cur_msg->text, "There were undefined references.") == 0)
     {
       latexila_build_msg_reinit (cur_msg);
-      return;
+      goto end;
     }
 
   if (set_filename)
@@ -267,6 +267,15 @@ add_message (LatexilaPostProcessorLatex *pp,
                                                      cur_msg);
 
   pp->priv->cur_msg = latexila_build_msg_new ();
+
+end:
+  pp->priv->state = STATE_START;
+
+  if (pp->priv->line_buffer != NULL)
+    g_string_free (pp->priv->line_buffer, TRUE);
+
+  pp->priv->line_buffer = NULL;
+  pp->priv->lines_count = 0;
 }
 
 static void


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