summaryrefslogtreecommitdiff
path: root/src/composite.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-09-12 05:38:37 +0000
committerKenichi Handa <handa@m17n.org>2008-09-12 05:38:37 +0000
commit9b08e2e1c3e58c1a21b58a2fec0c0db2545efa39 (patch)
tree32009bcf71729d355775a3109a48c8accea0f873 /src/composite.c
parentd917133375a78c60fab2d4cb75ea9513ab722963 (diff)
downloademacs-9b08e2e1c3e58c1a21b58a2fec0c0db2545efa39.tar.gz
(composition_reseat_it): If the current buffer is
not associated with a window, ignore the automatic composition. (find_automatic_composition): Likewise.
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/composite.c b/src/composite.c
index 92e7a1e44cb..b017721de67 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1093,7 +1093,7 @@ composition_reseat_it (cmp_it, charpos, bytepos, endpos, w, face, string)
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 @@ composition_reseat_it (cmp_it, charpos, bytepos, endpos, w, face, string)
break;
cmp_it->nglyphs = i;
}
+ else
+ goto no_composition;
cmp_it->from = 0;
return 1;
@@ -1255,8 +1257,14 @@ find_automatic_composition (pos, limit, start, end, gstring, string)
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 @@ find_automatic_composition (pos, limit, start, end, gstring, string)
{
tail = min (tail, limit + 3);
}
- w = XWINDOW (selected_window);
cur = orig;
retry: