mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Let PTK handle continuation characters on Win
This commit is contained in:
parent
a573e7607c
commit
7fc857a56d
1 changed files with 2 additions and 4 deletions
|
@ -8,7 +8,7 @@ from prompt_toolkit.filters import (Condition, IsMultiline, HasSelection,
|
|||
from prompt_toolkit.keys import Keys
|
||||
|
||||
from xonsh.aliases import xonsh_exit
|
||||
from xonsh.tools import ON_WINDOWS, check_for_partial_string
|
||||
from xonsh.tools import ON_WINDOWS, check_for_partial_string, LINE_CONT_STR
|
||||
from xonsh.shell import transform_command
|
||||
|
||||
env = builtins.__xonsh_env__
|
||||
|
@ -50,9 +50,7 @@ def carriage_return(b, cli, *, autoindent=True):
|
|||
b.delete_before_cursor(count=len(indent))
|
||||
elif (not doc.on_first_line and not current_line_blank):
|
||||
b.newline(copy_margin=autoindent)
|
||||
elif (doc.char_before_cursor == '\\' and
|
||||
not (not builtins.__xonsh_env__.get('FORCE_POSIX_PATHS') and
|
||||
ON_WINDOWS)):
|
||||
elif (doc.current_line.endswith(str(LINE_CONT_STR))):
|
||||
b.newline(copy_margin=autoindent)
|
||||
elif (doc.find_next_word_beginning() is not None and
|
||||
(any(not _is_blank(i) for i in doc.lines_from_current[1:]))):
|
||||
|
|
Loading…
Add table
Reference in a new issue