summaryrefslogtreecommitdiffstats
path: root/autoload/unison.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/unison.vim')
-rw-r--r--autoload/unison.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/autoload/unison.vim b/autoload/unison.vim
index cdc2efe5..e91699f0 100644
--- a/autoload/unison.vim
+++ b/autoload/unison.vim
@@ -56,7 +56,17 @@ function! unison#Complete(findstart, base) abort
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
- while start > 0 && line[start - 1] !~ '\s' && line[start - 1] != '(' && line[start - 1] != ')'
+ " Examples of where we want to count the start of a word:
+ "
+ " foo List.fold<cursor>
+ " ^
+ "
+ " {Abor<cursor>
+ " ^
+ "
+ " (List.fol<cursor>
+ " ^
+ while start > 0 && line[start - 1] !~ '\v\s|[(){}\[\]]'
let start -= 1
endwhile
return start