Skip to content

Conversation

@Ky9oss
Copy link

@Ky9oss Ky9oss commented Oct 22, 2025

This PR resolves an issue on Windows where send_file and send_mark tasks in ipython and Python 3.13/3.14 REPL result in an additional five blank lines at the end. Example:

>>> print('hello world')
hello world
>>> 
>>> 
>>> 
>>> 
>>> 

The issue arises because core.send adds an extra \r for string-type data and two \r for other data types on Windows. In common.bracket_paste_python, these are treated as two separate arrays, each appended with an empty data item. During a single send_file or send_mark, the following three groups of data are sent:

{ "print('hello world')", "" }
{ "\r", "" }
{ "\r", "" }

On Windows, each empty data item causes an extra line break. This results in five blank lines instead of the expected two. This PR fixes the issue.

@Ky9oss Ky9oss changed the title fix additional five blank lines on WIndows Fix the issue of five extra blank lines 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