jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Jed in UTF-8


Ethan Blanton <eblanton@xxxxxxxxxxxx> wrote:
>I hope that's helpful...

It was.  Does this patch help?  Thanks, --John

--- ../../../release/jed/jed-B0.99-17.56/src/cmds.c	Sun Nov 28 16:44:05 2004
+++ cmds.c	Mon Dec  6 00:17:30 2004
@@ -396,7 +396,7 @@
 /*{{{ ins_char_cmd */
 int ins_char_cmd (void)
 {
-   SLwchar_Type ch;
+   unsigned char ch;
    int wrap = Jed_Wrap_Column;
    int do_blink;
    int did_abbrev = 0;
@@ -428,6 +428,9 @@
    
    if ((CBuf->flags & OVERWRITE_MODE) && !eolp())
      {
+	/* FIXME: jed_del_wchar should be called for the last byte of a
+	 * UTF-8 sequence
+	 */
 	if ((did_abbrev == 0)
 	    && (-1 == jed_del_wchar ()))
 	  return -1;
@@ -442,7 +445,7 @@
 	unsigned int this_line_num = LineNum;
 	
 	if ((did_abbrev == 0)
-	    && (-1 == jed_insert_wchar (ch)))
+	    && (-1 == jed_insert_byte (ch)))
 	  return -1;
 
 	if (-1 == wrap_line(0))	       /* do not format--- just wrap */
@@ -473,7 +476,7 @@
 		|| ((ch == ')') || (ch == '}') || (ch == ']')))
 	       && !input_pending(&Number_Zero));
    if (did_abbrev == 0)
-     (void) jed_insert_wchar (ch);
+     (void) jed_insert_byte (ch);
    if (do_blink) blink_match ();
    return 1;
 }

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]