texinfo-commits
[Top][All Lists]
Advanced

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

[5811] fix crash when splitting footnotes window


From: Gavin D. Smith
Subject: [5811] fix crash when splitting footnotes window
Date: Mon, 08 Sep 2014 15:58:58 +0000

Revision: 5811
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5811
Author:   gavin
Date:     2014-09-08 15:58:56 +0000 (Mon, 08 Sep 2014)
Log Message:
-----------
fix crash when splitting footnotes window

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/Makefile.am
    trunk/info/session.c
    trunk/info/t/infodir/intera.info

Added Paths:
-----------
    trunk/info/t/split-footnotes.sh

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-09-08 15:12:03 UTC (rev 5810)
+++ trunk/ChangeLog     2014-09-08 15:58:56 UTC (rev 5811)
@@ -1,5 +1,11 @@
 2014-09-08  Gavin Smith  <address@hidden>
 
+       * info/session.c (info_set_node_of_window): Don't get or remove
+       footnotes nodes for footnotes nodes.
+       * info/t/split-footnotes.sh: New test.
+
+2014-09-08  Gavin Smith  <address@hidden>
+
        * info/session.c (free_history_node): Free 'nodename' field for
        internal nodes.
        (info_split_window): Copy 'nodename' field for new internal nodes.

Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am      2014-09-08 15:12:03 UTC (rev 5810)
+++ trunk/info/Makefile.am      2014-09-08 15:58:56 UTC (rev 5811)
@@ -110,6 +110,7 @@
        t/end-of-line.sh \
        t/goal-column.sh \
        t/last-no-history.sh \
+       t/split-footnotes.sh \
        t/adjust-anchors.sh \
        t/search-after-tag.sh \
        t/split-file-menu.sh \

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-09-08 15:12:03 UTC (rev 5810)
+++ trunk/info/session.c        2014-09-08 15:58:56 UTC (rev 5811)
@@ -836,8 +836,10 @@
   add_pointer_to_array (new, win->hist_index, win->hist, win->hist_slots, 16);
 
   /* If doing auto-footnote display/undisplay, show the footnotes belonging
-     to this window's node. */
-  if (auto_footnotes_p)
+     to this window's node.  Don't do that if it is a footnote node itself. */
+  if (auto_footnotes_p
+      && !((win->node->flags & N_IsInternal)
+           && !strcmp (win->node->nodename, "*Footnotes*")))
     info_get_or_remove_footnotes (win);
 }
 

Modified: trunk/info/t/infodir/intera.info
===================================================================
(Binary files differ)

Added: trunk/info/t/split-footnotes.sh
===================================================================
--- trunk/info/t/split-footnotes.sh                             (rev 0)
+++ trunk/info/t/split-footnotes.sh     2014-09-08 15:58:56 UTC (rev 5811)
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Copyright (C) 2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+srcdir=${srcdir:-.}
+. $srcdir/t/Init-test.inc
+. $t/Init-inter.inc
+
+run_ginfo -f intera -n 'Node with footnotes' -v automatic-footnotes=On
+# Move to automatic footnotes window and split it.  Check we don't crash.
+# FIXME: pseudotty should set the window height for reliable results.
+printf '\030o\0302q' >$PTY_TYPE
+. $t/Timeout-test.inc
+
+. $t/Cleanup.inc
+


Property changes on: trunk/info/t/split-footnotes.sh
___________________________________________________________________
Added: svn:executable
   + *




reply via email to

[Prev in Thread] Current Thread [Next in Thread]