Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Prevent readline from overriding COLUMNS and LINES environment variables, as
values are not updated on terminal resize.
7 changes: 7 additions & 0 deletions Modules/readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,13 @@ setup_readline(readlinestate *mod_state)
/* The name must be defined before initialization */
rl_readline_name = "python";

#if !defined(__APPLE__)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit surprised I had to rely on the __APPLE__ define here. As I understand apple OS is using libedit, so I would have thought relying on WITH_EDITLINE would be enough. But the macOS pipeline proved me wrong...

/* Prevent readline from changing environment variables such as LINES and
* COLUMNS.
*/
rl_change_environment = 0;
#endif

/* the libedit readline emulation resets key bindings etc
* when calling rl_initialize. So call it upfront
*/
Expand Down
Loading