diff src/pr-output.cc @ 10705:d500acdcf2dd

Remove extra newlines when displaying multi-dimensional arrays. Fixes bug #30029.
author Rik <octave@nomad.inbox5.com>
date Mon, 14 Jun 2010 19:53:19 -0700
parents a3635bc1ea19
children 6f34e781aed2
line wrap: on
line diff
--- a/src/pr-output.cc
+++ b/src/pr-output.cc
@@ -1895,8 +1895,16 @@
               octave_value page \
                 = MAT_T (Array<ELT_T> (nda.index (idx), nr, nc)); \
  \
-              page.print_with_name (os, nm); \
- \
+              if (i < ndims - 2) \
+                { \
+                  page.print_with_name (os, nm); \
+                } \
+              else \
+                { \
+                  page.print_name_tag (os, nm); \
+                  page.print_raw(os); \
+                } \
+              \
               if (i < m) \
                 NDA_T::increment_index (ra_idx, dims, 2); \
             } \