emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/indent.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/indent.c,v
Date: Sun, 29 Jun 2008 13:56:51 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/06/29 13:56:50

Index: indent.c
===================================================================
RCS file: /sources/emacs/emacs/src/indent.c,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -b -r1.208 -r1.209
--- indent.c    24 Jun 2008 17:58:50 -0000      1.208
+++ indent.c    29 Jun 2008 13:56:50 -0000      1.209
@@ -2020,12 +2020,14 @@
   struct window *w;
   Lisp_Object old_buffer;
   struct gcpro gcpro1;
-  int cols = 0;
+  Lisp_Object lcols = Qnil;
+  double cols;
 
   /* Allow LINES to be of the form (HPOS . VPOS) aka (COLUMNS . LINES).  */
   if (CONSP (lines) && (NUMBERP (XCAR (lines))))
     {
-      cols = XINT (XCAR (lines));
+      lcols = XCAR (lines);
+      cols = INTEGERP (lcols) ? (double) XINT (lcols) : XFLOAT_DATA (lcols);
       lines = XCDR (lines);
     }
 
@@ -2116,9 +2118,10 @@
       if (XINT (lines) >= 0 || IT_CHARPOS (it) > 0)
        move_it_by_lines (&it, XINT (lines), 0);
 
-      if (cols)
-       move_it_in_display_line (&it, ZV,
-                                cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)),
+      if (!NILP (lcols))
+       move_it_in_display_line
+         (&it, ZV,
+          (int)(cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)) + 0.5),
                                 MOVE_TO_X);
 
       SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));




reply via email to

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