Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
64c1215b
Commit
64c1215b
authored
Aug 20, 2014
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't call rl_initialize when stdout is not a tty
parent
68482fb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Modules/readline.c
Modules/readline.c
+2
-5
No files found.
Modules/readline.c
View file @
64c1215b
...
...
@@ -933,19 +933,15 @@ setup_readline(void)
begidx
=
PyInt_FromLong
(
0L
);
endidx
=
PyInt_FromLong
(
0L
);
#ifndef __APPLE__
if
(
!
isatty
(
STDOUT_FILENO
))
{
/* Issue #19884: stdout is no a terminal. Disable meta modifier
keys to not write the ANSI sequence "\033[1034h" into stdout. On
terminals supporting 8 bit characters like TERM=xterm-256color
(which is now the default Fedora since Fedora 18), the meta key is
used to enable support of 8 bit characters (ANSI sequence
"\033[1034h").
With libedit, this call makes readline() crash. */
"\033[1034h"). */
rl_variable_bind
(
"enable-meta-key"
,
"off"
);
}
#endif
/* Initialize (allows .inputrc to override)
*
...
...
@@ -957,6 +953,7 @@ setup_readline(void)
rl_read_init_file
(
NULL
);
else
#endif
/* __APPLE__ */
if
(
isatty
(
STDOUT_FILENO
))
rl_initialize
();
RESTORE_LOCALE
(
saved_locale
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment