summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-23 22:10:27 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-23 22:10:27 +0200
commitf5963f719eb85e8aa71aeb5c23c4edf4949adef1 (patch)
tree9c3ab6deeb29ff964cbd77d01e885b3237f6c59a /src/main.c
parentc88ebf7fa81833b401423214c62d0ecfaaa68b78 (diff)
downloadvim-git-f5963f719eb85e8aa71aeb5c23c4edf4949adef1.tar.gz
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'.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 029b64c76..d94b32a38 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1098,7 +1098,7 @@ main_loop(cmdwin, noexmode)
||
# endif
# ifdef FEAT_CONCEAL
- curwin->w_p_conc > 0
+ curwin->w_p_cole > 0
# endif
)
&& !equalpos(last_cursormoved, curwin->w_cursor))
@@ -1109,7 +1109,7 @@ main_loop(cmdwin, noexmode)
FALSE, curbuf);
# endif
# ifdef FEAT_CONCEAL
- if (curwin->w_p_conc > 0)
+ if (curwin->w_p_cole > 0)
{
conceal_old_cursor_line = last_cursormoved.lnum;
conceal_new_cursor_line = curwin->w_cursor.lnum;
@@ -1197,9 +1197,12 @@ main_loop(cmdwin, noexmode)
# if defined(FEAT_CONCEAL)
if (conceal_update_lines
- && conceal_old_cursor_line != conceal_new_cursor_line)
+ && (conceal_old_cursor_line != conceal_new_cursor_line
+ || conceal_cursor_line(curwin)
+ || need_cursor_line_redraw))
{
- update_single_line(curwin, conceal_old_cursor_line);
+ if (conceal_old_cursor_line != conceal_new_cursor_line)
+ update_single_line(curwin, conceal_old_cursor_line);
update_single_line(curwin, conceal_new_cursor_line);
curwin->w_valid &= ~VALID_CROW;
}