aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-01 02:10:14 +0000
committerRichard M. Stallman1994-04-01 02:10:14 +0000
commitb64b39804050021b9147a30fb67d79eba8df157c (patch)
tree67a3bde03022028d1d8ca497e14d97a51c80557d /src
parent46db8486643ce38a8324891763f4dfca8dcf2047 (diff)
downloademacs-b64b39804050021b9147a30fb67d79eba8df157c.tar.gz
emacs-b64b39804050021b9147a30fb67d79eba8df157c.zip
(adjust_window_charstarts): New function.
(direct_output_for_insert): Call it.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index c4d9b2ec364..887fbc81cbb 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -892,6 +892,33 @@ preserve_my_columns (w)
892 892
893#endif 893#endif
894 894
895/* Adjust by ADJUST the charstart values in window W
896 before vpos VPOS, which counts relative to the frame
897 (not relative to W itself). */
898
899void
900adjust_window_charstarts (w, vpos, adjust)
901 struct window *w;
902 int vpos;
903 int adjust;
904{
905 int left = XFASTINT (w->left);
906 int top = XFASTINT (w->top);
907 int right = left + window_internal_height (w);
908 int height = window_internal_height (w);
909 int i;
910
911 for (i = vpos + 1; i < top + height; i++)
912 {
913 int *charstart
914 = FRAME_CURRENT_GLYPHS (XFRAME (WINDOW_FRAME (w)))->charstarts[i];
915 int j;
916 for (j = left; j < right; j++)
917 if (charstart[j] > 0)
918 charstart[j] += adjust;
919 }
920}
921
895/* On discovering that the redisplay for a window was no good, 922/* On discovering that the redisplay for a window was no good,
896 cancel the columns of that window, so that when the window is 923 cancel the columns of that window, so that when the window is
897 displayed over again get_display_line will not complain. */ 924 displayed over again get_display_line will not complain. */
@@ -979,6 +1006,7 @@ direct_output_for_insert (g)
979#endif 1006#endif
980 current_frame->glyphs[vpos][hpos] = MAKE_GLYPH (frame, g, face); 1007 current_frame->glyphs[vpos][hpos] = MAKE_GLYPH (frame, g, face);
981 current_frame->charstarts[vpos][hpos] = point; 1008 current_frame->charstarts[vpos][hpos] = point;
1009 adjust_window_charstarts (w, vpos, 1);
982 } 1010 }
983 unchanged_modified = MODIFF; 1011 unchanged_modified = MODIFF;
984 beg_unchanged = GPT - BEG; 1012 beg_unchanged = GPT - BEG;