commit f6be7d89ef4c6a3d2004c5312578813c9a72410c
Author: Guillaume Munch <[email protected]>
Date:   Sun Nov 1 23:58:41 2015 +0000

    Fix bug #9813
    
    tex/row correspondance for \end{tabular}.

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index e827bfd..ae6ea58 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -2676,14 +2676,16 @@ void Tabular::TeXRow(otexstream & os, row_type row,
 void Tabular::latex(otexstream & os, OutputParams const & runparams) const
 {
        bool const is_tabular_star = !tabular_width.zero();
+       TexRow::RowEntry pos = TexRow::textEntry(runparams.lastid,
+                                                                               
         runparams.lastpos);
 
        //+---------------------------------------------------------------------
        //+                      first the opening preamble                    +
        //+---------------------------------------------------------------------
 
        os << safebreakln;
-       if (runparams.lastid != -1)
-               os.texrow().start(runparams.lastid, runparams.lastpos);
+       if (!TexRow::isNone(pos))
+               os.texrow().start(pos);
 
        if (rotate != 0)
                os << "\\begin{turn}{" << convert<string>(rotate) << "}\n";
@@ -2812,6 +2814,9 @@ void Tabular::latex(otexstream & os, OutputParams const & 
runparams) const
 
        if (rotate != 0)
                os << breakln << "\\end{turn}";
+
+       if (!TexRow::isNone(pos))
+               os.texrow().start(pos);
 }
 
 

Reply via email to