texlive[48195] Build/source/texk/web2c/synctexdir: Fix a bug that

commits+kakuto at tug.org commits+kakuto at tug.org
Sat Jul 14 21:00:50 CEST 2018


Revision: 48195
          http://tug.org/svn/texlive?view=revision&revision=48195
Author:   kakuto
Date:     2018-07-14 21:00:50 +0200 (Sat, 14 Jul 2018)
Log Message:
-----------
Fix a bug that Magnification is not recorded correctly. Reort by Karel Horak.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/synctexdir/ChangeLog
    trunk/Build/source/texk/web2c/synctexdir/synctex.c

Modified: trunk/Build/source/texk/web2c/synctexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/synctexdir/ChangeLog	2018-07-14 00:23:34 UTC (rev 48194)
+++ trunk/Build/source/texk/web2c/synctexdir/ChangeLog	2018-07-14 19:00:50 UTC (rev 48195)
@@ -1,3 +1,9 @@
+2018-07-15  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	* synctex.c: Fix a bug that Magnification is not correctly
+	recorded. Report by Karel Horak:
+	https://tug.org/pipermail/tex-live/2018-July/042063.html
+
 2018-06-13  Karl Berry  <karl at tug.org>
 
 	* man1/synctex.1: man page list syntax.

Modified: trunk/Build/source/texk/web2c/synctexdir/synctex.c
===================================================================
--- trunk/Build/source/texk/web2c/synctexdir/synctex.c	2018-07-14 00:23:34 UTC (rev 48194)
+++ trunk/Build/source/texk/web2c/synctexdir/synctex.c	2018-07-14 19:00:50 UTC (rev 48195)
@@ -1047,17 +1047,17 @@
         }
         return;
     }
+    if (SYNCTEX_GET_TOTAL_PAGES() == 0) {
+        /*  Now it is time to properly set up the scale factor. */
+        if (mag > 0) {
+            synctex_ctxt.magnification = mag;
+        }
+    }
     if (NULL != synctex_prepare_content()) {
         /*  First possibility: the .synctex file is already open because SyncTeX was activated on the CLI
          *  or it was activated with the \synctex macro and the first page is already shipped out.
          *  Second possibility: tries to open the .synctex, useful if synchronization was enabled
          *  from the source file and not from the CLI. */
-        if (SYNCTEX_GET_TOTAL_PAGES() == 0) {
-            /*  Now it is time to properly set up the scale factor. */
-            if (mag > 0) {
-                synctex_ctxt.magnification = mag;
-            }
-        }
         synctex_record_sheet(SYNCTEX_GET_TOTAL_PAGES()+1);
     }
 #   if SYNCTEX_DEBUG



More information about the tex-live-commits mailing list