emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r114628: Support frame dimension changes while TTY m


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r114628: Support frame dimension changes while TTY menus are displayed.
Date: Fri, 11 Oct 2013 15:43:38 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114628
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15575
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2013-10-11 18:42:06 +0300
message:
  Support frame dimension changes while TTY menus are displayed.
  
   src/xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
   have different dimensions.
   src/dispnew.c (fill_up_frame_row_with_spaces): Now has external
   visibility.
   src/dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/dispextern.h               
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
  src/dispnew.c                  dispnew.c-20091113204419-o5vbwnq5f7feedwu-258
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-10-11 15:30:21 +0000
+++ b/src/ChangeLog     2013-10-11 15:42:06 +0000
@@ -1,3 +1,13 @@
+2013-10-11  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
+       have different dimensions.  (Bug#15575)
+
+       * dispnew.c (fill_up_frame_row_with_spaces): Now has external
+       visibility.
+
+       * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
+
 2013-10-11  Dmitry Antipov  <address@hidden>
 
        * term.c (tty_menu_show): Never return with unbalanced

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2013-10-08 17:49:20 +0000
+++ b/src/dispextern.h  2013-10-11 15:42:06 +0000
@@ -3472,6 +3472,7 @@
 void syms_of_display (void);
 extern Lisp_Object Qredisplay_dont_pause;
 extern void spec_glyph_lookup_face (struct window *, GLYPH *);
+extern void fill_up_frame_row_with_spaces (struct glyph_row *, int);
 
 /* Defined in terminal.c */
 

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2013-10-11 11:11:28 +0000
+++ b/src/dispnew.c     2013-10-11 15:42:06 +0000
@@ -77,7 +77,6 @@
 static int required_matrix_width (struct window *);
 static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool);
 static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
-static void fill_up_frame_row_with_spaces (struct glyph_row *, int);
 static void build_frame_matrix_from_window_tree (struct glyph_matrix *,
                                                  struct window *);
 static void build_frame_matrix_from_leaf_window (struct glyph_matrix *,
@@ -2503,7 +2502,7 @@
 /* Add spaces to the end of ROW in a frame matrix until index UPTO is
    reached.  In frame matrices only one area, TEXT_AREA, is used.  */
 
-static void
+void
 fill_up_frame_row_with_spaces (struct glyph_row *row, int upto)
 {
   int i = row->used[TEXT_AREA];

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-10-11 11:01:48 +0000
+++ b/src/xdisp.c       2013-10-11 15:42:06 +0000
@@ -20590,10 +20590,10 @@
 deep_copy_glyph_row (struct glyph_row *to, struct glyph_row *from)
 {
   struct glyph *pointers[1 + LAST_AREA];
+  int to_used = to->used[TEXT_AREA];
 
   /* Save glyph pointers of TO.  */
   memcpy (pointers, to->glyphs, sizeof to->glyphs);
-  eassert (to->used[TEXT_AREA] == from->used[TEXT_AREA]);
 
   /* Do a structure assignment.  */
   *to = *from;
@@ -20603,7 +20603,12 @@
 
   /* Copy the glyphs.  */
   memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA],
-         from->used[TEXT_AREA] * sizeof (struct glyph));
+         min (from->used[TEXT_AREA], to_used) * sizeof (struct glyph));
+
+  /* If we filled only part of the TO row, fill the rest with
+     space_glyph (which will display as empty space).  */
+  if (to_used > from->used[TEXT_AREA])
+    fill_up_frame_row_with_spaces (to, to_used);
 }
 
 /* Display one menu item on a TTY, by overwriting the glyphs in the


reply via email to

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