Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Clear REPL when using bracketed_paste_python formatter #418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

g0t4
Copy link

@g0t4 g0t4 commented Mar 23, 2025

When using bracketed_paste_python with ipython and python3 the formatter calls remove_empty_lines which replaces FF with CR

https://github.com/g0t4/iron.nvim/blob/d8c2869/lua/iron/fts/common.lua#L119-L120

I split out a new core.clear_repl function, similar to core.close_repl and in there I bypass using .send_to_repl and instead go to chansend directly.

I have not yet investigated the implications for this on Windows, I am happy to help with that if this is the right direction to go with a fix for this.

And if I am not doing something else wrong.

Btw, clear works fine for lua and other REPLs that don't override the formatter.

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