mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
updated for version 7.0153
This commit is contained in:
parent
69e0ff94dc
commit
bb15b65864
@ -1,7 +1,7 @@
|
|||||||
" Vim completion script
|
" Vim completion script
|
||||||
" Language: CSS 2.1
|
" Language: CSS 2.1
|
||||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||||
" Last Change: 2005 Sep 27
|
" Last Change: 2005 Oct 02
|
||||||
|
|
||||||
function! csscomplete#CompleteCSS(findstart, base)
|
function! csscomplete#CompleteCSS(findstart, base)
|
||||||
if a:findstart
|
if a:findstart
|
||||||
@ -179,7 +179,7 @@ else
|
|||||||
elseif prop == 'font-family'
|
elseif prop == 'font-family'
|
||||||
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
|
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
|
||||||
elseif prop == 'font-size'
|
elseif prop == 'font-size'
|
||||||
return []
|
let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"]
|
||||||
elseif prop == 'font-style'
|
elseif prop == 'font-style'
|
||||||
let values = ["normal", "italic", "oblique"]
|
let values = ["normal", "italic", "oblique"]
|
||||||
elseif prop == 'font-variant'
|
elseif prop == 'font-variant'
|
||||||
@ -187,7 +187,7 @@ else
|
|||||||
elseif prop == 'font-weight'
|
elseif prop == 'font-weight'
|
||||||
let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
|
let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
|
||||||
elseif prop == 'font'
|
elseif prop == 'font'
|
||||||
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
|
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
|
||||||
elseif prop =~ '^\(height\|width\)$'
|
elseif prop =~ '^\(height\|width\)$'
|
||||||
let values = ["auto"]
|
let values = ["auto"]
|
||||||
elseif prop =~ '^\(left\|rigth\)$'
|
elseif prop =~ '^\(left\|rigth\)$'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*message.txt* For Vim version 7.0aa. Last change: 2005 Sep 25
|
*message.txt* For Vim version 7.0aa. Last change: 2005 Oct 02
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -768,6 +768,9 @@ To reduce the number of hit-enter prompts:
|
|||||||
- Add flags to 'shortmess'.
|
- Add flags to 'shortmess'.
|
||||||
- Reset 'showcmd' and/or 'ruler'.
|
- Reset 'showcmd' and/or 'ruler'.
|
||||||
|
|
||||||
|
If your script causes the hit-enter prompt and you don't know why, you may
|
||||||
|
find the |v:scrollstart| variable useful.
|
||||||
|
|
||||||
Also see 'mouse'. The hit-enter message is highlighted with the |hl-Question|
|
Also see 'mouse'. The hit-enter message is highlighted with the |hl-Question|
|
||||||
group.
|
group.
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" These commands create the option window.
|
" These commands create the option window.
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2005 Sep 13
|
" Last Change: 2005 Oct 02
|
||||||
|
|
||||||
" If there already is an option window, jump to that one.
|
" If there already is an option window, jump to that one.
|
||||||
if bufwinnr("option-window") > 0
|
if bufwinnr("option-window") > 0
|
||||||
@ -698,9 +698,11 @@ call append("$", "formatlistpat\tpattern to recognize a numbered list")
|
|||||||
call append("$", "\t(local to buffer)")
|
call append("$", "\t(local to buffer)")
|
||||||
call <SID>OptionL("flp")
|
call <SID>OptionL("flp")
|
||||||
if has("insert_expand")
|
if has("insert_expand")
|
||||||
call append("$", "complete\tspecifies how Insert mode completion works")
|
call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P")
|
||||||
call append("$", "\t(local to buffer)")
|
call append("$", "\t(local to buffer)")
|
||||||
call <SID>OptionL("cpt")
|
call <SID>OptionL("cpt")
|
||||||
|
call append("$", "completeopt\twhether to use a popup menu for Insert mode completion")
|
||||||
|
call <SID>OptionG("cot", &cot)
|
||||||
call append("$", "completefunc\tuser defined function for Insert mode completion")
|
call append("$", "completefunc\tuser defined function for Insert mode completion")
|
||||||
call append("$", "\t(local to buffer)")
|
call append("$", "\t(local to buffer)")
|
||||||
call <SID>OptionL("cfu")
|
call <SID>OptionL("cfu")
|
||||||
|
@ -19,7 +19,7 @@ $SPELLDIR/fr.utf-8.spl : $FILES
|
|||||||
:sys env LANG=fr_FR.UTF-8
|
:sys env LANG=fr_FR.UTF-8
|
||||||
$VIM -u NONE -e -c "mkspell! $SPELLDIR/fr fr_FR" -c q
|
$VIM -u NONE -e -c "mkspell! $SPELLDIR/fr fr_FR" -c q
|
||||||
|
|
||||||
../README_fr.txt : README_fr_FR.txt lisez-moi.txt
|
../README_fr.txt : README_fr_FR.txt
|
||||||
:cat $source >!$target
|
:cat $source >!$target
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -561,6 +561,7 @@ vimobj = \
|
|||||||
$(OBJDIR)\normal.obj \
|
$(OBJDIR)\normal.obj \
|
||||||
$(OBJDIR)\ops.obj \
|
$(OBJDIR)\ops.obj \
|
||||||
$(OBJDIR)\option.obj \
|
$(OBJDIR)\option.obj \
|
||||||
|
$(OBJDIR)\popupmenu.obj \
|
||||||
$(OBJDIR)\quickfix.obj \
|
$(OBJDIR)\quickfix.obj \
|
||||||
$(OBJDIR)\regexp.obj \
|
$(OBJDIR)\regexp.obj \
|
||||||
$(OBJDIR)\screen.obj \
|
$(OBJDIR)\screen.obj \
|
||||||
|
@ -241,6 +241,7 @@ LINK32_OBJS= \
|
|||||||
"$(INTDIR)/option.obj" \
|
"$(INTDIR)/option.obj" \
|
||||||
"$(INTDIR)/os_mswin.obj" \
|
"$(INTDIR)/os_mswin.obj" \
|
||||||
"$(INTDIR)/os_win32.obj" \
|
"$(INTDIR)/os_win32.obj" \
|
||||||
|
"$(INTDIR)/popupmenu.obj" \
|
||||||
"$(INTDIR)/quickfix.obj" \
|
"$(INTDIR)/quickfix.obj" \
|
||||||
"$(INTDIR)/regexp.obj" \
|
"$(INTDIR)/regexp.obj" \
|
||||||
"$(INTDIR)/screen.obj" \
|
"$(INTDIR)/screen.obj" \
|
||||||
@ -597,6 +598,10 @@ SOURCE=.\os_win32.c
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\popupmenu.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\quickfix.c
|
SOURCE=.\quickfix.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -402,6 +402,7 @@ OBJ = \
|
|||||||
$(OUTDIR)\os_mswin.obj \
|
$(OUTDIR)\os_mswin.obj \
|
||||||
$(OUTDIR)\os_win32.obj \
|
$(OUTDIR)\os_win32.obj \
|
||||||
$(OUTDIR)\pathdef.obj \
|
$(OUTDIR)\pathdef.obj \
|
||||||
|
$(OUTDIR)\popupmenu.obj \
|
||||||
$(OUTDIR)\quickfix.obj \
|
$(OUTDIR)\quickfix.obj \
|
||||||
$(OUTDIR)\regexp.obj \
|
$(OUTDIR)\regexp.obj \
|
||||||
$(OUTDIR)\screen.obj \
|
$(OUTDIR)\screen.obj \
|
||||||
@ -896,6 +897,8 @@ $(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL)
|
|||||||
$(OUTDIR)/pathdef.obj: $(OUTDIR) auto/pathdef.c $(INCL)
|
$(OUTDIR)/pathdef.obj: $(OUTDIR) auto/pathdef.c $(INCL)
|
||||||
$(CC) $(CFLAGS) auto/pathdef.c
|
$(CC) $(CFLAGS) auto/pathdef.c
|
||||||
|
|
||||||
|
$(OUTDIR)/popupmenu.obj: $(OUTDIR) popupmenu.c $(INCL)
|
||||||
|
|
||||||
$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
|
$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
|
||||||
|
|
||||||
$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL)
|
$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c $(INCL)
|
||||||
@ -986,6 +989,7 @@ proto.h: \
|
|||||||
proto/option.pro \
|
proto/option.pro \
|
||||||
proto/os_mswin.pro \
|
proto/os_mswin.pro \
|
||||||
proto/os_win32.pro \
|
proto/os_win32.pro \
|
||||||
|
proto/popupmenu.pro \
|
||||||
proto/quickfix.pro \
|
proto/quickfix.pro \
|
||||||
proto/regexp.pro \
|
proto/regexp.pro \
|
||||||
proto/screen.pro \
|
proto/screen.pro \
|
||||||
|
@ -256,6 +256,7 @@ Source =
|
|||||||
option.c
|
option.c
|
||||||
os_unix.c
|
os_unix.c
|
||||||
auto/pathdef.c
|
auto/pathdef.c
|
||||||
|
popupmenu.c
|
||||||
quickfix.c
|
quickfix.c
|
||||||
regexp.c
|
regexp.c
|
||||||
screen.c
|
screen.c
|
||||||
|
@ -27,6 +27,7 @@ static char_u *screen_puts_mbyte __ARGS((char_u *s, int l, int attr));
|
|||||||
static void msg_puts_attr_len __ARGS((char_u *str, int maxlen, int attr));
|
static void msg_puts_attr_len __ARGS((char_u *str, int maxlen, int attr));
|
||||||
static void msg_puts_display __ARGS((char_u *str, int maxlen, int attr, int recurse));
|
static void msg_puts_display __ARGS((char_u *str, int maxlen, int attr, int recurse));
|
||||||
static void msg_scroll_up __ARGS((void));
|
static void msg_scroll_up __ARGS((void));
|
||||||
|
static void inc_msg_scrolled __ARGS((void));
|
||||||
static void store_sb_text __ARGS((char_u **sb_str, char_u *s, int attr, int *sb_col, int finish));
|
static void store_sb_text __ARGS((char_u **sb_str, char_u *s, int attr, int *sb_col, int finish));
|
||||||
static void t_puts __ARGS((int *t_col, char_u *t_s, char_u *s, int attr));
|
static void t_puts __ARGS((int *t_col, char_u *t_s, char_u *s, int attr));
|
||||||
static void msg_puts_printf __ARGS((char_u *str, int maxlen));
|
static void msg_puts_printf __ARGS((char_u *str, int maxlen));
|
||||||
@ -207,7 +208,7 @@ msg_strtrunc(s, force)
|
|||||||
&& !exmode_active && msg_silent == 0) || force)
|
&& !exmode_active && msg_silent == 0) || force)
|
||||||
{
|
{
|
||||||
len = vim_strsize(s);
|
len = vim_strsize(s);
|
||||||
if (msg_scrolled)
|
if (msg_scrolled != 0)
|
||||||
/* Use all the columns. */
|
/* Use all the columns. */
|
||||||
room = (int)(Rows - msg_row) * Columns - 1;
|
room = (int)(Rows - msg_row) * Columns - 1;
|
||||||
else
|
else
|
||||||
@ -634,7 +635,7 @@ emsg(s)
|
|||||||
emsg_on_display = TRUE; /* remember there is an error message */
|
emsg_on_display = TRUE; /* remember there is an error message */
|
||||||
++msg_scroll; /* don't overwrite a previous message */
|
++msg_scroll; /* don't overwrite a previous message */
|
||||||
attr = hl_attr(HLF_E); /* set highlight mode for error messages */
|
attr = hl_attr(HLF_E); /* set highlight mode for error messages */
|
||||||
if (msg_scrolled)
|
if (msg_scrolled != 0)
|
||||||
need_wait_return = TRUE; /* needed in case emsg() is called after
|
need_wait_return = TRUE; /* needed in case emsg() is called after
|
||||||
* wait_return has reset need_wait_return
|
* wait_return has reset need_wait_return
|
||||||
* and a redraw is expected because
|
* and a redraw is expected because
|
||||||
@ -1762,7 +1763,7 @@ msg_puts_attr_len(str, maxlen, attr)
|
|||||||
* need_wait_return after some prompt, and then outputting something
|
* need_wait_return after some prompt, and then outputting something
|
||||||
* without scrolling
|
* without scrolling
|
||||||
*/
|
*/
|
||||||
if (msg_scrolled && !msg_scrolled_ign)
|
if (msg_scrolled != 0 && !msg_scrolled_ign)
|
||||||
need_wait_return = TRUE;
|
need_wait_return = TRUE;
|
||||||
msg_didany = TRUE; /* remember that something was outputted */
|
msg_didany = TRUE; /* remember that something was outputted */
|
||||||
|
|
||||||
@ -1875,7 +1876,7 @@ msg_puts_display(str, maxlen, attr, recurse)
|
|||||||
/* store text for scrolling back */
|
/* store text for scrolling back */
|
||||||
store_sb_text(&sb_str, s, attr, &sb_col, TRUE);
|
store_sb_text(&sb_str, s, attr, &sb_col, TRUE);
|
||||||
|
|
||||||
++msg_scrolled;
|
inc_msg_scrolled();
|
||||||
need_wait_return = TRUE; /* may need wait_return in main() */
|
need_wait_return = TRUE; /* may need wait_return in main() */
|
||||||
if (must_redraw < VALID)
|
if (must_redraw < VALID)
|
||||||
must_redraw = VALID;
|
must_redraw = VALID;
|
||||||
@ -1899,6 +1900,15 @@ msg_puts_display(str, maxlen, attr, recurse)
|
|||||||
if (quit_more)
|
if (quit_more)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* When we displayed a char in last column need to check if there
|
||||||
|
* is still more. */
|
||||||
|
if (*s >= ' '
|
||||||
|
#ifdef FEAT_RIGHTLEFT
|
||||||
|
&& !cmdmsg_rl
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
wrap = *s == '\n'
|
wrap = *s == '\n'
|
||||||
@ -2043,6 +2053,41 @@ msg_scroll_up()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Increment "msg_scrolled".
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
inc_msg_scrolled()
|
||||||
|
{
|
||||||
|
#ifdef FEAT_EVAL
|
||||||
|
if (*get_vim_var_str(VV_SCROLLSTART) == NUL)
|
||||||
|
{
|
||||||
|
char_u *p = sourcing_name;
|
||||||
|
char_u *tofree = NULL;
|
||||||
|
int len;
|
||||||
|
|
||||||
|
/* v:scrollstart is empty, set it to the script/function name and line
|
||||||
|
* number */
|
||||||
|
if (p == NULL)
|
||||||
|
p = (char_u *)_("Unknown");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
len = STRLEN(p) + 40;
|
||||||
|
tofree = alloc(len);
|
||||||
|
if (tofree != NULL)
|
||||||
|
{
|
||||||
|
vim_snprintf((char *)tofree, len, _("%s line %ld"),
|
||||||
|
p, (long)sourcing_lnum);
|
||||||
|
p = tofree;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set_vim_var_string(VV_SCROLLSTART, p, -1);
|
||||||
|
vim_free(tofree);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
++msg_scrolled;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To be able to scroll back at the "more" and "hit-enter" prompts we need to
|
* To be able to scroll back at the "more" and "hit-enter" prompts we need to
|
||||||
* store the displayed text and remember where screen lines start.
|
* store the displayed text and remember where screen lines start.
|
||||||
@ -2527,7 +2572,7 @@ do_more_prompt(typed_char)
|
|||||||
{
|
{
|
||||||
/* scroll up, display line at bottom */
|
/* scroll up, display line at bottom */
|
||||||
msg_scroll_up();
|
msg_scroll_up();
|
||||||
++msg_scrolled;
|
inc_msg_scrolled();
|
||||||
screen_fill((int)Rows - 2, (int)Rows - 1, 0,
|
screen_fill((int)Rows - 2, (int)Rows - 1, 0,
|
||||||
(int)Columns, ' ', ' ', 0);
|
(int)Columns, ' ', ' ', 0);
|
||||||
mp_last = disp_sb_line((int)Rows - 2, mp_last);
|
mp_last = disp_sb_line((int)Rows - 2, mp_last);
|
||||||
|
@ -3984,14 +3984,15 @@ find_decl(ptr, len, locally, thisblock, searchflags)
|
|||||||
{
|
{
|
||||||
setpcmark(); /* Set in findpar() otherwise */
|
setpcmark(); /* Set in findpar() otherwise */
|
||||||
curwin->w_cursor.lnum = 1;
|
curwin->w_cursor.lnum = 1;
|
||||||
|
par_pos = curwin->w_cursor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
par_pos = curwin->w_cursor;
|
||||||
while (curwin->w_cursor.lnum > 1 && *skipwhite(ml_get_curline()) != NUL)
|
while (curwin->w_cursor.lnum > 1 && *skipwhite(ml_get_curline()) != NUL)
|
||||||
--curwin->w_cursor.lnum;
|
--curwin->w_cursor.lnum;
|
||||||
}
|
}
|
||||||
curwin->w_cursor.col = 0;
|
curwin->w_cursor.col = 0;
|
||||||
par_pos = curwin->w_cursor;
|
|
||||||
|
|
||||||
/* Search forward for the identifier, ignore comment lines. */
|
/* Search forward for the identifier, ignore comment lines. */
|
||||||
found_pos.lnum = 0;
|
found_pos.lnum = 0;
|
||||||
|
@ -143,6 +143,7 @@ void qsort __ARGS((void *base, size_t elm_count, size_t elm_size, int (*cmp)(con
|
|||||||
# include "normal.pro"
|
# include "normal.pro"
|
||||||
# include "ops.pro"
|
# include "ops.pro"
|
||||||
# include "option.pro"
|
# include "option.pro"
|
||||||
|
# include "popupmenu.pro"
|
||||||
# include "quickfix.pro"
|
# include "quickfix.pro"
|
||||||
# include "regexp.pro"
|
# include "regexp.pro"
|
||||||
# include "screen.pro"
|
# include "screen.pro"
|
||||||
@ -243,7 +244,7 @@ extern char *vim_SelFile __ARGS((Widget toplevel, char *prompt, char *init_path,
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The perl include files pollute the namespace, therfore proto.h must be
|
* The perl include files pollute the namespace, therefore proto.h must be
|
||||||
* included before the perl include files. But then CV is not defined, which
|
* included before the perl include files. But then CV is not defined, which
|
||||||
* is used in if_perl.pro. To get around this, the perl prototype files are
|
* is used in if_perl.pro. To get around this, the perl prototype files are
|
||||||
* not included here for the perl files. Use a dummy define for CV for the
|
* not included here for the perl files. Use a dummy define for CV for the
|
||||||
|
50
src/spell.c
50
src/spell.c
@ -10035,19 +10035,38 @@ suggest_try_change(su)
|
|||||||
sp->ts_state = STATE_FINAL;
|
sp->ts_state = STATE_FINAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Don't swap if the first character is not a word character.
|
||||||
|
* SWAP3 etc. also don't make sense then. */
|
||||||
|
if (!spell_iswordp(p, curbuf))
|
||||||
|
{
|
||||||
|
sp->ts_state = STATE_REP_INI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
if (has_mbyte)
|
if (has_mbyte)
|
||||||
{
|
{
|
||||||
n = mb_cptr2len(p);
|
n = mb_cptr2len(p);
|
||||||
c = mb_ptr2char(p);
|
c = mb_ptr2char(p);
|
||||||
c2 = mb_ptr2char(p + n);
|
if (!spell_iswordp(p + n, curbuf))
|
||||||
|
c2 = c; /* don't swap non-word char */
|
||||||
|
else
|
||||||
|
c2 = mb_ptr2char(p + n);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
c2 = p[1];
|
{
|
||||||
|
if (!spell_iswordp(p + 1, curbuf))
|
||||||
|
c2 = c; /* don't swap non-word char */
|
||||||
|
else
|
||||||
|
c2 = p[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* When characters are identical, swap won't do anything.
|
||||||
|
* Also get here if the second char is not a word character. */
|
||||||
if (c == c2)
|
if (c == c2)
|
||||||
{
|
{
|
||||||
/* Characters are identical, swap won't do anything. */
|
|
||||||
sp->ts_state = STATE_SWAP3;
|
sp->ts_state = STATE_SWAP3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -10107,20 +10126,28 @@ suggest_try_change(su)
|
|||||||
c = mb_ptr2char(p);
|
c = mb_ptr2char(p);
|
||||||
fl = mb_cptr2len(p + n);
|
fl = mb_cptr2len(p + n);
|
||||||
c2 = mb_ptr2char(p + n);
|
c2 = mb_ptr2char(p + n);
|
||||||
c3 = mb_ptr2char(p + n + fl);
|
if (!spell_iswordp(p + n + fl, curbuf))
|
||||||
|
c3 = c; /* don't swap non-word char */
|
||||||
|
else
|
||||||
|
c3 = mb_ptr2char(p + n + fl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
c = *p;
|
c = *p;
|
||||||
c2 = p[1];
|
c2 = p[1];
|
||||||
c3 = p[2];
|
if (!spell_iswordp(p + 2, curbuf))
|
||||||
|
c3 = c; /* don't swap non-word char */
|
||||||
|
else
|
||||||
|
c3 = p[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When characters are identical: "121" then SWAP3 result is
|
/* When characters are identical: "121" then SWAP3 result is
|
||||||
* identical, ROT3L result is same as SWAP: "211", ROT3L
|
* identical, ROT3L result is same as SWAP: "211", ROT3L
|
||||||
* result is same as SWAP on next char: "112". Thus skip all
|
* result is same as SWAP on next char: "112". Thus skip all
|
||||||
* swapping. Also skip when c3 is NUL. */
|
* swapping. Also skip when c3 is NUL.
|
||||||
|
* Also get here when the third character is not a word
|
||||||
|
* character. Second character may any char: "a.b" -> "b.a" */
|
||||||
if (c == c3 || c3 == NUL)
|
if (c == c3 || c3 == NUL)
|
||||||
{
|
{
|
||||||
sp->ts_state = STATE_REP_INI;
|
sp->ts_state = STATE_REP_INI;
|
||||||
@ -10165,6 +10192,7 @@ suggest_try_change(su)
|
|||||||
mch_memmove(p + fl + tl, p, n);
|
mch_memmove(p + fl + tl, p, n);
|
||||||
mb_char2bytes(c, p);
|
mb_char2bytes(c, p);
|
||||||
mb_char2bytes(c2, p + tl);
|
mb_char2bytes(c2, p + tl);
|
||||||
|
p = p + tl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
@ -10172,6 +10200,16 @@ suggest_try_change(su)
|
|||||||
c = *p;
|
c = *p;
|
||||||
*p = p[2];
|
*p = p[2];
|
||||||
p[2] = c;
|
p[2] = c;
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!spell_iswordp(p, curbuf))
|
||||||
|
{
|
||||||
|
/* Middle char is not a word char, skip the rotate.
|
||||||
|
* First and third char were already checked at swap
|
||||||
|
* and swap3. */
|
||||||
|
sp->ts_state = STATE_REP_INI;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Rotate three characters left: "123" -> "231". We change
|
/* Rotate three characters left: "123" -> "231". We change
|
||||||
|
11
src/vim.h
11
src/vim.h
@ -1150,13 +1150,19 @@ typedef enum
|
|||||||
, HLF_SPC /* SpellCap */
|
, HLF_SPC /* SpellCap */
|
||||||
, HLF_SPR /* SpellRare */
|
, HLF_SPR /* SpellRare */
|
||||||
, HLF_SPL /* SpellLocal */
|
, HLF_SPL /* SpellLocal */
|
||||||
|
, HLF_PNI /* popup menu normal item */
|
||||||
|
, HLF_PSI /* popup menu selected item */
|
||||||
|
, HLF_PSB /* popup menu scrollbar */
|
||||||
|
, HLF_PST /* popup menu scrollbar thumb */
|
||||||
, HLF_COUNT /* MUST be the last one */
|
, HLF_COUNT /* MUST be the last one */
|
||||||
} hlf_T;
|
} 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! */
|
||||||
#define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
|
#define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
|
||||||
'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
|
'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
|
||||||
'f', 'F', 'A', 'C', 'D', 'T', '>', 'B', 'P', 'R', 'L'}
|
'f', 'F', 'A', 'C', 'D', 'T', '>', \
|
||||||
|
'B', 'P', 'R', 'L', \
|
||||||
|
'+', '=', 'x', 'X'}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Boolean constants
|
* Boolean constants
|
||||||
@ -1566,7 +1572,8 @@ int vim_memcmp __ARGS((void *, void *, size_t));
|
|||||||
#define VV_BEVAL_LNUM 41
|
#define VV_BEVAL_LNUM 41
|
||||||
#define VV_BEVAL_COL 42
|
#define VV_BEVAL_COL 42
|
||||||
#define VV_BEVAL_TEXT 43
|
#define VV_BEVAL_TEXT 43
|
||||||
#define VV_LEN 44 /* number of v: vars */
|
#define VV_SCROLLSTART 44
|
||||||
|
#define VV_LEN 45 /* number of v: vars */
|
||||||
|
|
||||||
#ifdef FEAT_CLIPBOARD
|
#ifdef FEAT_CLIPBOARD
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user