# HG changeset patch # User Kenichi Handa # Date 1221197917 0 # Node ID 464ec62a612ccba41cdf7f12679dcf5449023213 # Parent 314662df7c17cd443799d32bbedb564a882eba8f (composition_reseat_it): If the current buffer is not associated with a window, ignore the automatic composition. (find_automatic_composition): Likewise. diff -r 314662df7c17 -r 464ec62a612c src/composite.c --- a/src/composite.c Fri Sep 12 04:10:59 2008 +0000 +++ b/src/composite.c Fri Sep 12 05:38:37 2008 +0000 @@ -1093,7 +1093,7 @@ cmp_it->nchars = end - start; cmp_it->nglyphs = composition_table[cmp_it->id]->glyph_len; } - else + else if (w) { Lisp_Object val, elt; int i; @@ -1119,6 +1119,8 @@ break; cmp_it->nglyphs = i; } + else + goto no_composition; cmp_it->from = 0; return 1; @@ -1255,8 +1257,14 @@ Lisp_Object check_val, val, elt; int check_lookback; int c; + Lisp_Object window; struct window *w; + window = Fget_buffer_create (Fcurrent_buffer ()); + if (NILP (window)) + return 0; + w = XWINDOW (window); + orig.pos = pos; if (NILP (string)) { @@ -1279,7 +1287,6 @@ { tail = min (tail, limit + 3); } - w = XWINDOW (selected_window); cur = orig; retry: