mirror of
https://github.com/vim/vim.git
synced 2025-08-30 20:43:35 -04:00
updated for version 7.0222
This commit is contained in:
parent
e48ec1fa6b
commit
f71a3db47e
@ -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 <SID>OptionG("hl", &hl)
|
||||
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")
|
||||
|
@ -1713,6 +1713,8 @@ free_buf_options(buf, free_p_ff)
|
||||
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 @@ get_winopts(buf)
|
||||
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
|
||||
|
@ -236,6 +236,8 @@ static void ex_popup __ARGS((exarg_T *eap));
|
||||
#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 @@ theend:
|
||||
# endif
|
||||
}
|
||||
|
||||
#if defined(FEAT_MOUSE) || defined(PROTO)
|
||||
/*
|
||||
* Open a new tab page.
|
||||
*/
|
||||
@ -7039,6 +7042,7 @@ tabpage_new()
|
||||
ea.arg = (char_u *)"";
|
||||
ex_splitview(&ea);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* :tabnext command
|
||||
@ -10588,7 +10592,7 @@ ex_nohlsearch(eap)
|
||||
exarg_T *eap;
|
||||
{
|
||||
no_hlsearch = TRUE;
|
||||
redraw_all_later(NOT_VALID);
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -10618,7 +10622,7 @@ ex_match(eap)
|
||||
{
|
||||
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))
|
||||
|
@ -4512,7 +4512,7 @@ nv_zet(cap)
|
||||
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 @@ dozet:
|
||||
|
||||
#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 @@ nv_brackets(cap)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_SYN_HL
|
||||
#ifdef FEAT_SPELL
|
||||
/*
|
||||
* "[s", "[S", "]s" and "]S": move to next spell error.
|
||||
*/
|
||||
|
12
src/spell.c
12
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 @@ spell_move_to(wp, dir, allwords, curline, attrp)
|
||||
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 @@ spell_move_to(wp, dir, allwords, curline, attrp)
|
||||
: p - buf)
|
||||
> wp->w_cursor.col)))
|
||||
{
|
||||
# ifdef FEAT_SYN_HL
|
||||
if (has_syntax)
|
||||
{
|
||||
col = p - buf;
|
||||
@ -2094,6 +2097,7 @@ spell_move_to(wp, dir, allwords, curline, attrp)
|
||||
FALSE, &can_spell);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
can_spell = TRUE;
|
||||
|
||||
if (can_spell)
|
||||
@ -4554,7 +4558,7 @@ spell_reload_one(fname, added_word)
|
||||
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 @@ spell_add_word(word, len, bad, index, undo)
|
||||
if (buf != NULL)
|
||||
buf_reload(buf, buf->b_orig_mode);
|
||||
|
||||
redraw_all_later(NOT_VALID);
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15476,4 +15480,4 @@ expand_spelling(lnum, col, pat, matchp)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FEAT_SYN_HL */
|
||||
#endif /* FEAT_SPELL */
|
||||
|
@ -510,6 +510,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
|
||||
#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 @@ typedef enum
|
||||
, 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
|
||||
|
@ -4733,7 +4733,7 @@ win_drag_status_line(dragwin, offset)
|
||||
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 @@ win_new_height(wp, height)
|
||||
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 @@ last_status_rec(fr, statusline)
|
||||
else
|
||||
win_new_height(wp, wp->w_height - 1);
|
||||
comp_col();
|
||||
redraw_all_later(NOT_VALID);
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
}
|
||||
#ifdef FEAT_VERTSPLIT
|
||||
|
Loading…
x
Reference in New Issue
Block a user