diff options
| author | Konfekt <Konfekt@users.noreply.github.com> | 2024-03-09 13:04:46 +0100 |
|---|---|---|
| committer | Konfekt <Konfekt@users.noreply.github.com> | 2024-03-09 13:04:46 +0100 |
| commit | 258a8cf5e15cd6c3ac84ac98094ddae554e97c3f (patch) | |
| tree | e5ca748eb2497439579c569863e0cdfd6965e86d | |
| parent | 3178df3e2a77efc2d3e866b8a920d6a1bd5521ed (diff) | |
| download | vim-ai-258a8cf5e15cd6c3ac84ac98094ddae554e97c3f.tar.gz | |
fix typo
| -rw-r--r-- | autoload/vim_ai.vim | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/autoload/vim_ai.vim b/autoload/vim_ai.vim index 940b4a2..b79e344 100644 --- a/autoload/vim_ai.vim +++ b/autoload/vim_ai.vim @@ -1,4 +1,13 @@ call vim_ai_config#load() +if &compatible || exists('g:loaded_vim_ai') + finish +endif + +function! s:vim_ai() + +endfunction + +let g:loaded_vim_ai = 1 let s:plugin_root = expand('<sfile>:p:h:h') let s:complete_py = s:plugin_root . "/py/complete.py" @@ -130,7 +139,7 @@ function! vim_ai#AIRun(config, ...) range let l:is_selection = a:2 else let l:is_selection = g:vim_ai_is_selection_pending && - \ a:firstline == line("'>") && a:lastline == line("'>") + \ a:firstline == line("'<") && a:lastline == line("'>") endif let l:selection = s:GetSelectionOrRange(l:is_selection, a:firstline, a:lastline) @@ -196,7 +205,7 @@ function! vim_ai#AIChatRun(uses_range, config, ...) range " l:is_selection used in Python script if a:uses_range let l:is_selection = g:vim_ai_is_selection_pending && - \ a:firstline == line("'>") && a:lastline == line("'>") + \ a:firstline == line("'<") && a:lastline == line("'>") let l:selection = s:GetSelectionOrRange(l:is_selection, a:firstline, a:lastline) else let l:is_selection = 0 |