0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

updated for version 7.0136

This commit is contained in:
Bram Moolenaar
2005-08-24 22:16:11 +00:00
parent 5bcb2eba3d
commit 6e7c7f3a19
12 changed files with 162 additions and 59 deletions

View File

@@ -13749,22 +13749,16 @@ f_spellbadword(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
int attr;
char_u *ptr;
int len;
rettv->vval.v_string = NULL;
rettv->v_type = VAR_STRING;
#ifdef FEAT_SYN_HL
/* Find the start of the badly spelled word. */
if (spell_move_to(FORWARD, TRUE, TRUE) == FAIL)
return;
/* Get the length of the word and copy it. */
ptr = ml_get_cursor();
len = spell_check(curwin, ptr, &attr, NULL);
rettv->vval.v_string = vim_strnsave(ptr, len);
/* Find the start and length of the badly spelled word. */
len = spell_move_to(FORWARD, TRUE, TRUE);
if (len != 0)
rettv->vval.v_string = vim_strnsave(ml_get_cursor(), len);
#endif
}