diff options
author | vimboss <devnull@localhost> | 2005-08-24 22:16:11 +0000 |
---|---|---|
committer | vimboss <devnull@localhost> | 2005-08-24 22:16:11 +0000 |
commit | bea3e5e2da116cbfe1a86e2f856ef2c9c522f8a4 (patch) | |
tree | 47bf7d7944d912a5ea62ba22a81636f419bec45a /src/eval.c | |
parent | ec4071404b2465e52b11479d415d7d825b229912 (diff) | |
download | vim-7-0136.tar.gz |
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -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 } |