texinfo-commits
[Top][All Lists]
Advanced

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

[5730] window_toggle_wrap


From: Gavin D. Smith
Subject: [5730] window_toggle_wrap
Date: Sun, 03 Aug 2014 14:07:52 +0000

Revision: 5730
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5730
Author:   gavin
Date:     2014-08-03 14:07:51 +0000 (Sun, 03 Aug 2014)
Log Message:
-----------
window_toggle_wrap

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/display.c
    trunk/info/signals.c
    trunk/info/window.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-08-03 13:31:14 UTC (rev 5729)
+++ trunk/ChangeLog     2014-08-03 14:07:51 UTC (rev 5730)
@@ -5,6 +5,12 @@
        terminal_prep_terminal.  This prevents flickering between the "normal"
        and "alternate" screens in an xterm when resizing.
 
+       * info/display.c (display_update_one_window): Always display line
+       continuation character in rightmost column.  Don't display an extra 
character
+       if line wrapping is off.
+       * info/window.c (window_toggle_wrap): Don't free two arrays that were
+       already freed.  Disable call to display_scroll_line_starts.
+
 2014-08-03  Gavin Smith  <address@hidden>
 
        * info/search.c (regexp_search): Take WINDOW argument to save results

Modified: trunk/info/display.c
===================================================================
--- trunk/info/display.c        2014-08-03 13:31:14 UTC (rev 5729)
+++ trunk/info/display.c        2014-08-03 14:07:51 UTC (rev 5730)
@@ -280,13 +280,21 @@
           /* If this character cannot be printed in this line, we have
              found the end of this line as it would appear on the screen. */
 
+          text_buffer_add_char (&tb_printed_line, '\0');
+
+          finish = display_node_text (win, pl_num,
+                      text_buffer_base (&tb_printed_line), pl_bytes, pl_chars);
+
           if (!delim)
             {
+              terminal_goto_xy (win->width - 1, win->first_row + pl_num);
               if (!(win->flags & W_NoWrap))
-                text_buffer_add_char (&tb_printed_line, '\\');
+                terminal_put_text ("\\");
               else
                 {
-                  text_buffer_add_char (&tb_printed_line, '$');
+                  terminal_put_text ("$");
+                  rep = 0; /* Don't display this character. */
+
                   /* If this window has chosen not to wrap lines, skip to the
                      end of the logical line in the buffer, and start a new
                      line here. */
@@ -295,13 +303,9 @@
                         && *mbi_cur_ptr (iter) == '\n')
                       break;
                 }
+              fflush (stdout);
             }
 
-          text_buffer_add_char (&tb_printed_line, '\0');
-
-          finish = display_node_text (win, pl_num,
-                      text_buffer_base (&tb_printed_line), pl_bytes, pl_chars);
-
           ++pl_num;
 
           pl_bytes = 0;
@@ -329,7 +333,7 @@
             } 
         }
 
-      if (*cur_ptr != '\n') 
+      if (*cur_ptr != '\n' && rep) 
         {
           int i;
           

Modified: trunk/info/signals.c
===================================================================
--- trunk/info/signals.c        2014-08-03 13:31:14 UTC (rev 5729)
+++ trunk/info/signals.c        2014-08-03 14:07:51 UTC (rev 5730)
@@ -317,7 +317,6 @@
            sigwinch_block_count > 0. */
         sigwinch_block_count++;
 
-       terminal_prep_terminal ();
        reset_info_window_sizes ();
 
         sigwinch_block_count--;

Modified: trunk/info/window.c
===================================================================
--- trunk/info/window.c 2014-08-03 13:31:14 UTC (rev 5729)
+++ trunk/info/window.c 2014-08-03 14:07:51 UTC (rev 5730)
@@ -533,14 +533,16 @@
       /* Make sure that point appears within this window. */
       window_adjust_pagetop (window);
 
+      /* Disable for now - recalculate_line_starts above freed old_starts. */
+#if 0
       /* If the pagetop hasn't changed maybe we can do some scrolling now
          to speed up the display.  Many of the line starts will be the same,
          so scrolling here is a very good optimization.*/
       if (old_pagetop == window->pagetop)
         display_scroll_line_starts
           (window, old_pagetop, old_starts, old_lines);
-      free (old_starts);
-      free (old_xlat);
+#endif
+
     }
   window->flags |= W_UpdateWindow;
 }




reply via email to

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