Giter Site home page Giter Site logo

Comments (10)

bfredl avatar bfredl commented on August 30, 2024

Cannot reproduce. Do you have more complete steps to reproduce?
Btw the code that moves the cursor is

    for w in self.vim.windows:
        if w.buffer == self.buf:
            w.cursor = [len(self.buf), int(1e9)]

which should only move the cursor in the jupyter buffer. But this reminds me this should be made dynamically configurable, which should be easy now that we have neovim/neovim#3603

from nvim-ipy.

languitar avatar languitar commented on August 30, 2024

Steps to reproduce:

  1. start nvim with some python file
  2. :IPython
  3. Focus python file again
  4. C+w o so that the python file is the only visible one
  5. move cursor somewhere
  6. In a new shell: jupyter console --existing
  7. In that shell, enter some python code, e.g. 2+3

Cursor in vim moves to first line in the python file

NVIM v0.1.1-165-g074d3dc (compiled Jan 4 2016 11:10:24)

from nvim-ipy.

bfredl avatar bfredl commented on August 30, 2024

I cannot reproduce on bf7bc4dcf (master 18 hours ago). It could possible that the startup is racy with some autocommands or something. Could you try with minimal nvimrc with only this plugin?

from nvim-ipy.

languitar avatar languitar commented on August 30, 2024

This also happens with this minimal config:
https://github.com/languitar/config-vim/tree/nvim-ipy-bug

The important part seems to be that this only happens if the ipython buffer is not shown in a window.

from nvim-ipy.

bfredl avatar bfredl commented on August 30, 2024

hmm weird, and always moves to the first line, even if you do it many times? Just for debugging try add return as the first line in append_outbuf in rplugin/python/nvim_ipy.py and see if still happens.

from nvim-ipy.

languitar avatar languitar commented on August 30, 2024

file-optimized

Here is a badly made screencast showing what I experience. It seems this only happens the first time the ipython buffers gets to the background.

from nvim-ipy.

bfredl avatar bfredl commented on August 30, 2024

Did you try with disabled append_outbuf as I suggested above?

from nvim-ipy.

languitar avatar languitar commented on August 30, 2024

Without that the cursor does not jump.

from nvim-ipy.

bfredl avatar bfredl commented on August 30, 2024

If you just remove this part

    for w in self.vim.windows:
        if w.buffer == self.buf:
            w.cursor = [len(self.buf), int(1e9)]

does it still happen?

from nvim-ipy.

languitar avatar languitar commented on August 30, 2024

With these three lines removed the issue still exists.

from nvim-ipy.

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.