cohama / lexima.vim

Auto close parentheses and repeat by dot dot dot...
1.01k stars 46 forks source link

Fix checking of backspace option #124

Closed uplus closed 2 years ago

uplus commented 2 years ago

problem

In my environment I get the following error even though the backspace option contains start.

error

lexima: 'backspace' option does not contain 'start'. (Recommendation: set backspace=indent,eol,start)

my config

set backspace=start,eol,indent

cause

The cause is the handling of the return value of match(). Before the fix, it was checking if the return value was 0 or not. If the backspace option has start at the beginning, an error will occur.

solution

I have fixed it to check if the return value is -1 or not.