updated for version 7.0222
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 7dff513..bebeeda 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Mar 10
+" Last Change: 2006 Mar 12
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -389,6 +389,12 @@
call append("$", "hlsearch\thighlight all matches for the last used search pattern")
call <SID>BinOptionG("hls", &hls)
if has("syntax")
+ call append("$", "cursorcolumn\thighlight the screen column of the cursor")
+ call append("$", "\t(local to window)")
+ call <SID>BinOptionL("cuc")
+ call append("$", "cursorline\thighlight the screen line of the cursor")
+ call append("$", "\t(local to window)")
+ call <SID>BinOptionL("cul")
call append("$", "spell\thighlight spelling mistakes")
call append("$", "\t(local to window)")
call <SID>BinOptionL("spell")
diff --git a/src/buffer.c b/src/buffer.c
index 6010dbd..44aac34 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1713,6 +1713,8 @@
clear_string_option(&buf->b_p_nf);
#ifdef FEAT_SYN_HL
clear_string_option(&buf->b_p_syn);
+#endif
+#ifdef FEAT_SPELL
clear_string_option(&buf->b_p_spc);
clear_string_option(&buf->b_p_spf);
vim_free(buf->b_cap_prog);
@@ -2389,7 +2391,7 @@
curwin->w_p_fdl = p_fdls;
#endif
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
if (curwin->w_p_spell && *buf->b_p_spl != NUL)
did_set_spelllang(buf);
#endif
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 7e5e3b1..f1c6bb1 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -236,6 +236,8 @@
#endif
#ifndef FEAT_SYN_HL
# define ex_syntax ex_ni
+#endif
+#ifndef FEAT_SPELL
# define ex_spell ex_ni
# define ex_mkspell ex_ni
# define ex_spelldump ex_ni
@@ -7025,6 +7027,7 @@
# endif
}
+#if defined(FEAT_MOUSE) || defined(PROTO)
/*
* Open a new tab page.
*/
@@ -7039,6 +7042,7 @@
ea.arg = (char_u *)"";
ex_splitview(&ea);
}
+#endif
/*
* :tabnext command
@@ -10588,7 +10592,7 @@
exarg_T *eap;
{
no_hlsearch = TRUE;
- redraw_all_later(NOT_VALID);
+ redraw_all_later(SOME_VALID);
}
/*
@@ -10618,7 +10622,7 @@
{
vim_free(curwin->w_match[mi].regprog);
curwin->w_match[mi].regprog = NULL;
- redraw_later(NOT_VALID); /* always need a redraw */
+ redraw_later(SOME_VALID); /* always need a redraw */
}
if (ends_excmd(*eap->arg))
diff --git a/src/normal.c b/src/normal.c
index a2e3e7f..5fb0473 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -4512,7 +4512,7 @@
long old_fdl = curwin->w_p_fdl;
int old_fen = curwin->w_p_fen;
#endif
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
int undo = FALSE;
#endif
@@ -4885,7 +4885,7 @@
#endif /* FEAT_FOLDING */
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
case 'u': /* "zug" and "zuw": undo "zg" and "zw" */
++no_mapping;
++allow_keys; /* no mapping for nchar, but allow key codes */
@@ -6410,7 +6410,7 @@
}
#endif
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
/*
* "[s", "[S", "]s" and "]S": move to next spell error.
*/
diff --git a/src/spell.c b/src/spell.c
index 036f60c..4a65aee 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -299,7 +299,7 @@
#include "vim.h"
-#if defined(FEAT_SYN_HL) || defined(PROTO)
+#if defined(FEAT_SPELL) || defined(PROTO)
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
@@ -1999,8 +1999,10 @@
char_u *endp;
hlf_T attr;
int len;
+# ifdef FEAT_SYN_HL
int has_syntax = syntax_present(wp->w_buffer);
int col;
+# endif
int can_spell;
char_u *buf = NULL;
int buflen = 0;
@@ -2087,6 +2089,7 @@
: p - buf)
> wp->w_cursor.col)))
{
+# ifdef FEAT_SYN_HL
if (has_syntax)
{
col = p - buf;
@@ -2094,6 +2097,7 @@
FALSE, &can_spell);
}
else
+#endif
can_spell = TRUE;
if (can_spell)
@@ -4554,7 +4558,7 @@
if (spell_load_file(fname, NULL, slang, FALSE) == NULL)
/* reloading failed, clear the language */
slang_clear(slang);
- redraw_all_later(NOT_VALID);
+ redraw_all_later(SOME_VALID);
didit = TRUE;
}
}
@@ -9003,7 +9007,7 @@
if (buf != NULL)
buf_reload(buf, buf->b_orig_mode);
- redraw_all_later(NOT_VALID);
+ redraw_all_later(SOME_VALID);
}
}
@@ -15476,4 +15480,4 @@
}
#endif
-#endif /* FEAT_SYN_HL */
+#endif /* FEAT_SPELL */
diff --git a/src/vim.h b/src/vim.h
index e2514cf..5b176d4 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -510,6 +510,7 @@
#define INVERTED 20 /* redisplay inverted part that changed */
#define INVERTED_ALL 25 /* redisplay whole inverted part */
#define REDRAW_TOP 30 /* display first w_upd_rows screen lines */
+#define SOME_VALID 35 /* like NOT_VALID but may scroll */
#define NOT_VALID 40 /* buffer needs complete redraw */
#define CLEAR 50 /* screen messed up, clear it */
@@ -1180,15 +1181,18 @@
, HLF_TP /* tabpage line */
, HLF_TPS /* tabpage line selected */
, HLF_TPF /* tabpage line filler */
+ , HLF_CUC /* 'cursurcolumn' */
+ , HLF_CUL /* 'cursurline' */
, HLF_COUNT /* MUST be the last one */
} hlf_T;
-/* the HL_FLAGS must be in the same order as the HLF_ enums! */
+/* The HL_FLAGS must be in the same order as the HLF_ enums!
+ * When chainging this also adjust the default for 'highlight'. */
#define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
'f', 'F', 'A', 'C', 'D', 'T', '>', \
'B', 'P', 'R', 'L', \
- '+', '=', 'x', 'X', '*', '#', '_'}
+ '+', '=', 'x', 'X', '*', '#', '_', '!', '.'}
/*
* Boolean constants
diff --git a/src/window.c b/src/window.c
index 4af25aa..10bb873 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4733,7 +4733,7 @@
p_ch = Rows - cmdline_row;
if (p_ch < 1)
p_ch = 1;
- redraw_all_later(NOT_VALID);
+ redraw_all_later(SOME_VALID);
showmode();
}
@@ -4986,7 +4986,7 @@
wp->w_prev_fraction_row = wp->w_wrow;
win_comp_scroll(wp);
- redraw_win_later(wp, NOT_VALID);
+ redraw_win_later(wp, SOME_VALID);
#ifdef FEAT_WINDOWS
wp->w_redr_status = TRUE;
#endif
@@ -5184,7 +5184,7 @@
else
win_new_height(wp, wp->w_height - 1);
comp_col();
- redraw_all_later(NOT_VALID);
+ redraw_all_later(SOME_VALID);
}
}
#ifdef FEAT_VERTSPLIT