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
aac9b716
Commit
aac9b716
authored
Aug 27, 2016
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issue #19884: Merge Readline updates from 3.5
parents
ef91bb26
c427b8d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
13 deletions
+18
-13
Lib/test/test_readline.py
Lib/test/test_readline.py
+1
-1
Misc/NEWS
Misc/NEWS
+2
-0
Modules/readline.c
Modules/readline.c
+15
-12
No files found.
Lib/test/test_readline.py
View file @
aac9b716
...
...
@@ -111,7 +111,7 @@ class TestHistoryManipulation (unittest.TestCase):
class
TestReadline
(
unittest
.
TestCase
):
@
unittest
.
skipIf
(
readline
.
_READLINE_VERSION
<
0x060
0
and
not
is_editline
,
@
unittest
.
skipIf
(
readline
.
_READLINE_VERSION
<
0x060
1
and
not
is_editline
,
"not supported in this library version"
)
def
test_init
(
self
):
# Issue #19884: Ensure that the ANSI sequence "\033[1034h" is not
...
...
Misc/NEWS
View file @
aac9b716
...
...
@@ -46,6 +46,8 @@ Core and Builtins
Library
-------
- Issue #19884: Avoid spurious output on OS X with Gnu Readline.
- Issue #10513: Fix a regression in Connection.commit(). Statements should
not be reset after a commit.
...
...
Modules/readline.c
View file @
aac9b716
...
...
@@ -1146,19 +1146,22 @@ setup_readline(readlinestate *mod_state)
mod_state
->
begidx
=
PyLong_FromLong
(
0L
);
mod_state
->
endidx
=
PyLong_FromLong
(
0L
);
#ifndef __APPLE__
if
(
!
isatty
(
STDOUT_FILENO
))
{
/* Issue #19884: stdout is not 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. */
rl_variable_bind
(
"enable-meta-key"
,
"off"
);
}
#ifdef __APPLE__
if
(
!
using_libedit_emulation
)
#endif
{
if
(
!
isatty
(
STDOUT_FILENO
))
{
/* Issue #19884: stdout is not 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. */
rl_variable_bind
(
"enable-meta-key"
,
"off"
);
}
}
/* Initialize (allows .inputrc to override)
*
...
...
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