changeset 56593:47fd67a37101

(compute_motion): Fix check for full width window in non-window case. Do not count left truncation glyph on window systems.
author Kim F. Storm <storm@cua.dk>
date Mon, 02 Aug 2004 23:42:14 +0000
parents 612b6e5acada
children 5b9242222549 09f3fd9f680d 0bdb5a16ae51
files src/indent.c
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/indent.c	Mon Aug 02 23:41:59 2004 +0000
+++ b/src/indent.c	Mon Aug 02 23:42:14 2004 +0000
@@ -1231,6 +1231,7 @@
   int prev_vpos = 0;
   int contin_hpos;		/* HPOS of last column of continued line.  */
   int prev_tab_offset;		/* Previous tab offset.  */
+  int continuation_glyph_width;
 
   XSETBUFFER (buffer, current_buffer);
   XSETWINDOW (window, win);
@@ -1259,6 +1260,12 @@
 	width -= 1;
     }
 
+  continuation_glyph_width = 0;
+#ifdef HAVE_WINDOW_SYSTEM
+  if (!FRAME_WINDOW_P (XFRAME (win->frame)))
+    continuation_glyph_width = 1;
+#endif
+
   immediate_quit = 1;
   QUIT;
 
@@ -1382,7 +1389,8 @@
 	{
 	  if (hscroll
 	      || (truncate_partial_width_windows
-		  && width < FRAME_COLS (XFRAME (WINDOW_FRAME (win))))
+		  && ((width + continuation_glyph_width)
+		      < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))))
 	      || !NILP (current_buffer->truncate_lines))
 	    {
 	      /* Truncating: skip to newline, unless we are already past
@@ -1666,7 +1674,7 @@
 		      hpos -= hscroll;
 		      /* Count the truncation glyph on column 0 */
 		      if (hscroll > 0)
-			hpos++;
+			hpos += continuation_glyph_width;
 		      tab_offset = 0;
 		    }
 		  contin_hpos = 0;