better Input Method Editor (IME) support
[st.git] / st.c
diff --git a/st.c b/st.c
index 574dbee..cf8687e 100644 (file)
--- a/st.c
+++ b/st.c
@@ -731,8 +731,10 @@ sigchld(int a)
        if (pid != p)
                return;
 
-       if (!WIFEXITED(stat) || WEXITSTATUS(stat))
-               die("child finished with error '%d'\n", stat);
+       if (WIFEXITED(stat) && WEXITSTATUS(stat))
+               die("child exited with status %d\n", WEXITSTATUS(stat));
+       else if (WIFSIGNALED(stat))
+               die("child terminated due to signal %d\n", WTERMSIG(stat));
        exit(0);
 }
 
@@ -1452,7 +1454,8 @@ tsetattr(int *attr, int l)
                        } else {
                                fprintf(stderr,
                                        "erresc(default): gfx attr %d unknown\n",
-                                       attr[i]), csidump();
+                                       attr[i]);
+                               csidump();
                        }
                        break;
                }
@@ -2261,7 +2264,7 @@ eschandle(uchar ascii)
        case 'Z': /* DECID -- Identify Terminal */
                ttywrite(vtiden, strlen(vtiden), 0);
                break;
-       case 'c': /* RIS -- Reset to inital state */
+       case 'c': /* RIS -- Reset to initial state */
                treset();
                resettitle();
                xloadcols();
@@ -2591,6 +2594,7 @@ draw(void)
                        term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
        term.ocx = cx, term.ocy = term.c.y;
        xfinishdraw();
+       xximspot(term.ocx, term.ocy);
 }
 
 void