[uim-commit] r843 - trunk/fep

yamamoto at freedesktop.org yamamoto at freedesktop.org
Fri May 20 06:29:45 PDT 2005


Author: yamamoto
Date: 2005-05-20 06:29:41 -0700 (Fri, 20 May 2005)
New Revision: 843

Modified:
   trunk/fep/escseq.c
   trunk/fep/uim-fep.c
Log:
 * fep/escseq.c(get_cursor_position): break if read returns 0 five times


Modified: trunk/fep/escseq.c
===================================================================
--- trunk/fep/escseq.c	2005-05-16 18:29:39 UTC (rev 842)
+++ trunk/fep/escseq.c	2005-05-20 13:29:41 UTC (rev 843)
@@ -384,6 +384,7 @@
   if (g_opt.status_type == LASTLINE) {
     write(g_win_out, "\n", strlen("\n"));
   }
+  s_cursor.row = s_cursor.col = UNDEFINED;
   /* °ÂÁ´¤Ê°ÌÃ֤˰ÜÆ° */
   put_cursor_address(1, 1);
   s_cursor.row = s_cursor.col = UNDEFINED;
@@ -495,6 +496,7 @@
   ssize_t len = 0;
   ssize_t read_len = 0;
   char *escseq = ibuf - 1;
+  int loop_count = 0;
 
   assert(!g_opt.no_report_cursor);
 
@@ -508,7 +510,10 @@
     char *next_escseq;
     len += (read_len = read_stdin(ibuf + len, sizeof(ibuf) - len));
     if (read_len == 0) {
-      break;
+      debug(("loop = %d\n", loop_count + 1));
+      if (++loop_count == 5) {
+        break;
+      }
     }
     ibuf[len] = '\0';
 

Modified: trunk/fep/uim-fep.c
===================================================================
--- trunk/fep/uim-fep.c	2005-05-16 18:29:39 UTC (rev 842)
+++ trunk/fep/uim-fep.c	2005-05-20 13:29:41 UTC (rev 843)
@@ -283,6 +283,7 @@
       case 'K':
         g_opt.print_key = TRUE;
         g_opt.status_type = NONE;
+        g_opt.no_report_cursor = TRUE;
         break;
 
       case 'u':



More information about the Uim-commit mailing list