comparison src/font-lock.c @ 842:dc12269565c9

[xemacs-hg @ 2002-05-14 18:14:27 by ben] fix crash -- tab at buffer beg font-lock.c: Don't use off the beginning position to initiate syntax cache.
author ben
date Tue, 14 May 2002 18:14:30 +0000
parents bf645ed7cfe3
children 047d37eb70d7
comparison
equal deleted inserted replaced
841:44478bd99873 842:dc12269565c9
434 struct syntax_cache *scache; 434 struct syntax_cache *scache;
435 435
436 setup_context_cache (buf, pt); 436 setup_context_cache (buf, pt);
437 pt = context_cache.cur_point; 437 pt = context_cache.cur_point;
438 438
439 scache = setup_buffer_syntax_cache (buf, pt - 1, 1); 439 scache = setup_buffer_syntax_cache (buf, pt > BUF_BEGV (buf) ? pt - 1 : pt,
440 1);
440 if (pt > BUF_BEGV (buf)) 441 if (pt > BUF_BEGV (buf))
441 { 442 {
442 c = BUF_FETCH_CHAR (buf, pt - 1); 443 c = BUF_FETCH_CHAR (buf, pt - 1);
443 syncode = SYNTAX_CODE_FROM_CACHE (scache, c); 444 syncode = SYNTAX_CODE_FROM_CACHE (scache, c);
444 } 445 }