Skip to content

Conversation

@Ky9oss
Copy link

@Ky9oss Ky9oss commented Oct 22, 2025

This pull request addresses an issue with extra blank lines on Windows, which causes additional blank lines between code lines in IPython and the REPL of Python 3.13/3.14. Example:

Python 3.11.7 | packaged by Anaconda, Inc. | (main, Dec 15 2023, 18:05:47) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.20.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: class MyClass:
   ...:
   ...:         def hello(self):
   ...:
   ...:                     print('hello python\n')
   ...:

In [2]:

In [2]:

In [2]:

In [2]: c = MyClass()

In [3]:

In [3]: c.hello()

The issue stems from vim.fn.chansend appending \r\n to each piece of data on Windows. In Python 3.13/3.14 and IPython, \r\n is interpreted as two line breaks instead of one, resulting in an extra blank line after each line of code.
To fix this, we manually join each piece of data with \r.

@Ky9oss Ky9oss closed this Oct 22, 2025
@Ky9oss Ky9oss reopened this Oct 22, 2025
@Ky9oss Ky9oss changed the title Fix extra blank line after each line of code on Windows Fix extra blank line after each code line on Windows Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant