Merge pull request #2720 from vaaaaanquish/dev_quote

entering quotation
This commit is contained in:
Gil Forsyth 2018-07-17 16:20:33 -04:00 committed by GitHub
commit e1f2bcd5ed
Failed to generate hash of commit
2 changed files with 18 additions and 4 deletions

14
news/dev_quote.rst Normal file
View file

@ -0,0 +1,14 @@
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:**
* Fixed issue that can't insert quotation marks and double quotes
for completion.
**Security:** None

View file

@ -251,8 +251,8 @@ def load_xonsh_bindings(key_bindings):
if buffer.document.current_char == '\'':
buffer.cursor_position += 1
elif whitespace_or_bracket_before(event.cli)\
and whitespace_or_bracket_after(event.cli):
elif whitespace_or_bracket_before()\
and whitespace_or_bracket_after():
buffer.insert_text('\'')
buffer.insert_text('\'', move_cursor=False)
else:
@ -264,8 +264,8 @@ def load_xonsh_bindings(key_bindings):
if buffer.document.current_char == '"':
buffer.cursor_position += 1
elif whitespace_or_bracket_before(event.cli)\
and whitespace_or_bracket_after(event.cli):
elif whitespace_or_bracket_before()\
and whitespace_or_bracket_after():
buffer.insert_text('"')
buffer.insert_text('"', move_cursor=False)
else: