Commits

Anonymous committed 1902f6d

coding.c (Funencodable_char_position): Pay attention to the buffer text relocation (Bug#9389).

Comments (0)

Files changed (2)

+2011-12-11  Kenichi Handa  <handa@m17n.org>
+
+	* coding.c (Funencodable_char_position): Pay attention to the
+	buffer text relocation (Bug#9389).
+
 2011-12-10  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xterm.c (x_term_init): Move call to gdk_window_add_filter before
     }
 
   positions = Qnil;
+  charset_map_loaded = 0;
   while (1)
     {
       int c;
 	}
 
       from++;
+      if (charset_map_loaded && NILP (string))
+	{
+	  p = CHAR_POS_ADDR (from);
+	  pend = CHAR_POS_ADDR (to);
+	  if (from < GPT && to >= GPT)
+	    stop = GPT_ADDR;
+	  else
+	    stop = pend;
+	  charset_map_loaded = 0;
+	}
     }
 
   return (NILP (count) ? Fcar (positions) : Fnreverse (positions));