Add keywords completion for lines without '\n'

#1098 fix
Completion refactoring