Fix crash when the currentWord lookup is at the beginning of the line
Fix crash when the currentWord lookup is at the beginning of the line

BUG:279117

jfmcarreira/kate,sandsmark/kate,hlamer/kate,hlamer/kate,cmacq2/kate,hlamer/kate,hlamer/kate,jfmcarreira/kate,sandsmark/kate,hlamer/kate,DickJ/kate,hlamer/kate,cmacq2/kate,DickJ/kate,DickJ/kate,hlamer/kate,hlamer/kate,sandsmark/kate,cmacq2/kate,DickJ/kate,sandsmark/kate,hlamer/kate,hlamer/kate,jfmcarreira/kate