mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
* #4845: conditional import of ptk_win32 -> windows only * #4845: added news entry * #4845: moved news entry to separate file
This commit is contained in:
parent
5401a246c6
commit
349dee75a3
2 changed files with 26 additions and 1 deletions
23
news/main.rst
Normal file
23
news/main.rst
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
**Added:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Changed:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Deprecated:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Removed:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Fixed:**
|
||||||
|
|
||||||
|
* Fixed `whole_word_jumping` xontrib failing on Linux, conditional import of ``ptk_win32`` → Windows only
|
||||||
|
|
||||||
|
**Security:**
|
||||||
|
|
||||||
|
* <news item>
|
|
@ -17,7 +17,6 @@ configuration of the Control+Backspace key binding.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import prompt_toolkit.input.ansi_escape_sequences as ansiseq
|
import prompt_toolkit.input.ansi_escape_sequences as ansiseq
|
||||||
import prompt_toolkit.input.win32 as ptk_win32
|
|
||||||
from prompt_toolkit.filters import EmacsInsertMode, ViInsertMode
|
from prompt_toolkit.filters import EmacsInsertMode, ViInsertMode
|
||||||
from prompt_toolkit.key_binding.bindings.named_commands import get_by_name
|
from prompt_toolkit.key_binding.bindings.named_commands import get_by_name
|
||||||
from prompt_toolkit.keys import Keys
|
from prompt_toolkit.keys import Keys
|
||||||
|
@ -80,6 +79,9 @@ def custom_keybindings(bindings, **kw):
|
||||||
if XSH.env.get("XONSH_WHOLE_WORD_CTRL_BKSP", True):
|
if XSH.env.get("XONSH_WHOLE_WORD_CTRL_BKSP", True):
|
||||||
CONTROL_BKSP = "\x08"
|
CONTROL_BKSP = "\x08"
|
||||||
if ON_WINDOWS:
|
if ON_WINDOWS:
|
||||||
|
# issue #4845: Windows only (isort competes with black :-()
|
||||||
|
from prompt_toolkit.input import win32 as ptk_win32 # black:skip
|
||||||
|
|
||||||
# On windows BKSP is "\x08" and CTRL-BKSP is "\x7f"
|
# On windows BKSP is "\x08" and CTRL-BKSP is "\x7f"
|
||||||
CONTROL_BKSP = "\x7f"
|
CONTROL_BKSP = "\x7f"
|
||||||
ptk_win32.ConsoleInputReader.mappings[b"\x7f"] = CONTROL_BKSP
|
ptk_win32.ConsoleInputReader.mappings[b"\x7f"] = CONTROL_BKSP
|
||||||
|
|
Loading…
Add table
Reference in a new issue