abbrevs: only trigger completion if the word is preceded by space

This commit is contained in:
David Strobach 2020-03-27 21:52:17 +01:00
parent 78de276032
commit e7df18840d

View file

@ -23,7 +23,7 @@ def expand_abbrev(buffer):
if abbrevs is None: if abbrevs is None:
return return
document = buffer.document document = buffer.document
word = document.get_word_before_cursor() word = document.get_word_before_cursor(WORD=True)
if word in abbrevs.keys(): if word in abbrevs.keys():
partial = document.text[: document.cursor_position] partial = document.text[: document.cursor_position]
startix, endix, quote = check_for_partial_string(partial) startix, endix, quote = check_for_partial_string(partial)