Mercurial > vim
comparison src/ex_cmds.c @ 2250:1bac28a53fae vim73
Add the conceal patch from Vince Negri.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 05 Jun 2010 23:22:07 +0200 |
parents | 8c6a66e2b3cc |
children | 12ebd6f6dfce |
comparison
equal
deleted
inserted
replaced
2249:6d3d35ff2c2b | 2250:1bac28a53fae |
---|---|
3409 if (buf == curbuf) /* already in new buffer */ | 3409 if (buf == curbuf) /* already in new buffer */ |
3410 auto_buf = TRUE; | 3410 auto_buf = TRUE; |
3411 else | 3411 else |
3412 #endif | 3412 #endif |
3413 { | 3413 { |
3414 #ifdef FEAT_SYN_HL | |
3415 /* | |
3416 * <VN> We could instead free the synblock | |
3417 * and re-attach to buffer, perhaps. | |
3418 */ | |
3419 if (curwin->w_s == &(curwin->w_buffer->b_s)) | |
3420 curwin->w_s = &(buf->b_s); | |
3421 #endif | |
3414 curwin->w_buffer = buf; | 3422 curwin->w_buffer = buf; |
3415 curbuf = buf; | 3423 curbuf = buf; |
3416 ++curbuf->b_nwindows; | 3424 ++curbuf->b_nwindows; |
3417 /* set 'fileformat' */ | 3425 /* set 'fileformat' */ |
3418 if (*p_ffs && !oldbuf) | 3426 if (*p_ffs && !oldbuf) |
3715 #endif | 3723 #endif |
3716 | 3724 |
3717 #ifdef FEAT_SPELL | 3725 #ifdef FEAT_SPELL |
3718 /* If the window options were changed may need to set the spell language. | 3726 /* If the window options were changed may need to set the spell language. |
3719 * Can only do this after the buffer has been properly setup. */ | 3727 * Can only do this after the buffer has been properly setup. */ |
3720 if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL) | 3728 if (did_get_winopts && curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL) |
3721 (void)did_set_spelllang(curbuf); | 3729 (void)did_set_spelllang(curwin); |
3722 #endif | 3730 #endif |
3723 | 3731 |
3724 if (command == NULL) | 3732 if (command == NULL) |
3725 { | 3733 { |
3726 if (newcol >= 0) /* position set by autocommands */ | 3734 if (newcol >= 0) /* position set by autocommands */ |
5961 | 5969 |
5962 /* set filetype to "help". */ | 5970 /* set filetype to "help". */ |
5963 set_option_value((char_u *)"ft", 0L, (char_u *)"help", OPT_LOCAL); | 5971 set_option_value((char_u *)"ft", 0L, (char_u *)"help", OPT_LOCAL); |
5964 | 5972 |
5965 #ifdef FEAT_SYN_HL | 5973 #ifdef FEAT_SYN_HL |
5966 if (!syntax_present(curbuf)) | 5974 if (!syntax_present(curwin)) |
5967 #endif | 5975 #endif |
5968 { | 5976 { |
5969 for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum) | 5977 for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum) |
5970 { | 5978 { |
5971 line = ml_get_buf(curbuf, lnum, FALSE); | 5979 line = ml_get_buf(curbuf, lnum, FALSE); |