GithubHelp home page GithubHelp logo

Error messages about supertab HOT 4 CLOSED

ervandew avatar ervandew commented on August 26, 2024
Error messages

from supertab.

Comments (4)

ervandew avatar ervandew commented on August 26, 2024

I'm not able to reproduce this issue, but I'm thinking of committing the patch below to resolve it. I'm going to use supertab for a day or so with the patch applied to make sure I don't run into any problems. Do you mind applying this patch to see if it fixes the errors you've been encountering?

diff --git a/plugin/supertab.vim b/plugin/supertab.vim
index 99b516c..e89369f 100644
--- a/plugin/supertab.vim
+++ b/plugin/supertab.vim
@@ -214,18 +214,6 @@ endfunction " }}}
 " s:Init {{{
 " Global initilization when supertab is loaded.
 function! s:Init()
-  augroup supertab_init
-    autocmd!
-    autocmd BufEnter * call <SID>InitBuffer()
-  augroup END
-
-  " ensure InitBuffer gets called for the first buffer, after the ftplugins
-  " have been called.
-  augroup supertab_init_first
-    autocmd!
-    autocmd FileType <buffer> call <SID>InitBuffer()
-  augroup END
-
   " Setup mechanism to restore original completion type upon leaving insert
   " mode if configured to do so
   if g:SuperTabRetainCompletionDuration == 'insert'
@@ -326,11 +314,9 @@ endfunction " }}}
 " previous entry in a completion list, and determines whether or not to simply
 " retain the normal usage of <tab> based on the cursor position.
 function! s:SuperTab(command)
-  if s:WillComplete()
-    " rare case where no autocmds have fired for this buffer to initialize the
-    " supertab vars.
-    call s:InitBuffer()
+  call s:InitBuffer()

+  if s:WillComplete()
     " optionally enable enhanced longest completion
     if g:SuperTabLongestEnhanced && &completeopt =~ 'longest'
       call s:EnableLongestEnhancement()

from supertab.

bybor avatar bybor commented on August 26, 2024

Thanks.
I was able to reproduce this issue on same file and after applying patch it works ok.

Additional info on my environment, in case it means anything

Using gVim 7.3 (patches 1-98) from Cream installer (Vim only)
Windows 7 x64
Starting gVim from VisualStudio as external tool with following params:

-c "simalt ~x" --servername VisualStudio --remote-tab-silent +"call cursor($(CurLine),$(CurCol))" $(ItemPath)

from supertab.

ervandew avatar ervandew commented on August 26, 2024

I was able to reproduce the issue on the same file after apply patch

after apply patch it works ok

Sorry, but these two parts of that sentence left me a bit confused. Are you saying that the issue is still present after apply the patch, or that after apply the patch the problem went away? I'm guessing the former, but I want to make sure.

I'm able to reproduce the issue you initially reported using the unpatched supertab source, then opening vim using the remote call arguments you supplied, and then attempting tab completion. After apply the suggested patch the issue no longer occurs. I went ahead and committed my change to github and uploaded the latest version to vim.org. So if you're still having problems, try grabbing the latest version.

from supertab.

bybor avatar bybor commented on August 26, 2024

The issue is gone after applying the patch. Sorry for lame sentence.

Thanks

from supertab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.