summaryrefslogtreecommitdiffstats
path: root/src/spell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spell.c')
-rw-r--r--src/spell.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/spell.c b/src/spell.c
index 43c521dde6..3ae484c145 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -1336,7 +1336,7 @@ no_spell_checking(win_T *wp)
spell_move_to(
win_T *wp,
int dir, // FORWARD or BACKWARD
- int allwords, // TRUE for "[s"/"]s", FALSE for "[S"/"]S"
+ smt_T behaviour, // Behaviour of the function
int curline,
hlf_T *attrp) // return: attributes of bad word or NULL
// (only when "dir" is FORWARD)
@@ -1441,7 +1441,9 @@ spell_move_to(
if (attr != HLF_COUNT)
{
// We found a bad word. Check the attribute.
- if (allwords || attr == HLF_SPB)
+ if (behaviour == SMT_ALL
+ || (behaviour == SMT_BAD && attr == HLF_SPB)
+ || (behaviour == SMT_RARE && attr == HLF_SPR))
{
// When searching forward only accept a bad word after
// the cursor.