diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-05 23:22:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-05 23:22:07 +0200 |
commit | 860cae1cec85aeb06668a2b071727c43869acf15 (patch) | |
tree | 8f7b62b69f4a7d3340902178927bbc3f9d24cc3e /src/edit.c | |
parent | 945e2dbb633ed29b697a8d4eea51672e3c11143b (diff) | |
download | vim-860cae1cec85aeb06668a2b071727c43869acf15.zip |
Add the conceal patch from Vince Negri.
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/src/edit.c b/src/edit.c index a6a28cc9a..9f7106165 100644 --- a/src/edit.c +++ b/src/edit.c @@ -698,6 +698,10 @@ edit(cmdchar, startln, count) do_check_scrollbind(TRUE); #endif +#ifdef FEAT_CURSORBIND + if (curwin->w_p_crb) + do_check_cursorbind(); +#endif update_curswant(); old_topline = curwin->w_topline; #ifdef FEAT_DIFF @@ -1277,7 +1281,7 @@ doESCkey: inserted_space = FALSE; break; -#if defined(FEAT_DIGRAPHS) || defined (FEAT_INS_EXPAND) +#if defined(FEAT_DIGRAPHS) || defined(FEAT_INS_EXPAND) case Ctrl_K: /* digraph or keyword completion */ # ifdef FEAT_INS_EXPAND if (ctrl_x_mode == CTRL_X_DICTIONARY) @@ -1470,7 +1474,7 @@ ins_redraw(ready) * highlighting is correct after making a change (e.g., inserting * a "(". The autocommand may also require a redraw, so it's done * again below, unfortunately. */ - if (syntax_present(curbuf) && must_redraw) + if (syntax_present(curwin) && must_redraw) update_screen(0); # endif apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf); @@ -2960,7 +2964,7 @@ ins_compl_dictionaries(dict_start, pat, flags, thesaurus) ptr = pat + 2; else ptr = pat; - spell_dump_compl(curbuf, ptr, regmatch.rm_ic, &dir, 0); + spell_dump_compl(ptr, regmatch.rm_ic, &dir, 0); } else # endif @@ -9119,6 +9123,9 @@ ins_s_right() ins_up(startcol) int startcol; /* when TRUE move to Insstart.col */ { +#ifdef FEAT_CONCEAL + linenr_T oldline = curwin->w_cursor.lnum; +#endif pos_T tpos; linenr_T old_topline = curwin->w_topline; #ifdef FEAT_DIFF @@ -9141,6 +9148,13 @@ ins_up(startcol) #ifdef FEAT_CINDENT can_cindent = TRUE; #endif +#ifdef FEAT_CONCEAL + if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) + { + update_single_line(curwin, oldline); + update_single_line(curwin, curwin->w_cursor.lnum); + } +#endif } else vim_beep(); @@ -9182,6 +9196,10 @@ ins_pageup() ins_down(startcol) int startcol; /* when TRUE move to Insstart.col */ { +#ifdef FEAT_CONCEAL + linenr_T oldline = curwin->w_cursor.lnum; + linenr_T oldbotline = curwin->w_botline; +#endif pos_T tpos; linenr_T old_topline = curwin->w_topline; #ifdef FEAT_DIFF @@ -9204,6 +9222,16 @@ ins_down(startcol) #ifdef FEAT_CINDENT can_cindent = TRUE; #endif +#ifdef FEAT_CONCEAL + if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) + { + update_single_line(curwin, oldline); + /* Don't do this if we've scrolled, the line is already + * drawn */ + if (oldbotline == curwin->w_botline) + update_single_line(curwin, curwin->w_cursor.lnum); + } +#endif } else vim_beep(); |