Mercurial > vim
comparison src/gui.c @ 2378:85b7dc8da5eb vim73
Add the 'concealcursor' option to decide when the cursor line is to be
concealed or not.
Rename 'conc' to 'cole' as the short name for 'conceallevel'.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 23 Jul 2010 22:10:27 +0200 |
parents | 8878a9f8db87 |
children | 0ca06a92adfb |
comparison
equal
deleted
inserted
replaced
2377:878562053ba3 | 2378:85b7dc8da5eb |
---|---|
4920 # endif | 4920 # endif |
4921 # if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL) | 4921 # if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL) |
4922 || | 4922 || |
4923 # endif | 4923 # endif |
4924 # ifdef FEAT_CONCEAL | 4924 # ifdef FEAT_CONCEAL |
4925 curwin->w_p_conc > 0 | 4925 curwin->w_p_cole > 0 |
4926 # endif | 4926 # endif |
4927 ) | 4927 ) |
4928 && !equalpos(last_cursormoved, curwin->w_cursor)) | 4928 && !equalpos(last_cursormoved, curwin->w_cursor)) |
4929 { | 4929 { |
4930 # ifdef FEAT_AUTOCMD | 4930 # ifdef FEAT_AUTOCMD |
4931 if (has_cursormoved()) | 4931 if (has_cursormoved()) |
4932 apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf); | 4932 apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf); |
4933 # endif | 4933 # endif |
4934 # ifdef FEAT_CONCEAL | 4934 # ifdef FEAT_CONCEAL |
4935 if (curwin->w_p_conc > 0) | 4935 if (curwin->w_p_cole > 0) |
4936 { | 4936 { |
4937 conceal_old_cursor_line = last_cursormoved.lnum; | 4937 conceal_old_cursor_line = last_cursormoved.lnum; |
4938 conceal_new_cursor_line = curwin->w_cursor.lnum; | 4938 conceal_new_cursor_line = curwin->w_cursor.lnum; |
4939 conceal_update_lines = TRUE; | 4939 conceal_update_lines = TRUE; |
4940 } | 4940 } |
4945 | 4945 |
4946 update_screen(0); /* may need to update the screen */ | 4946 update_screen(0); /* may need to update the screen */ |
4947 setcursor(); | 4947 setcursor(); |
4948 # if defined(FEAT_CONCEAL) | 4948 # if defined(FEAT_CONCEAL) |
4949 if (conceal_update_lines | 4949 if (conceal_update_lines |
4950 && conceal_old_cursor_line != conceal_new_cursor_line) | 4950 && (conceal_old_cursor_line != conceal_new_cursor_line |
4951 { | 4951 || conceal_cursor_line(curwin) |
4952 update_single_line(curwin, conceal_old_cursor_line); | 4952 || need_cursor_line_redraw)) |
4953 { | |
4954 if (conceal_old_cursor_line != conceal_new_cursor_line) | |
4955 update_single_line(curwin, conceal_old_cursor_line); | |
4953 update_single_line(curwin, conceal_new_cursor_line); | 4956 update_single_line(curwin, conceal_new_cursor_line); |
4954 curwin->w_valid &= ~VALID_CROW; | 4957 curwin->w_valid &= ~VALID_CROW; |
4955 } | 4958 } |
4956 # endif | 4959 # endif |
4957 out_flush(); /* make sure output has been written */ | 4960 out_flush(); /* make sure output has been written */ |