Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc1cf63

Browse files
fix send_current_block_to_external_editor
1 parent812d7ee commitfc1cf63

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎bpython/curtsiesfrontend/repl.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ def down_one_line(self):
594594
self._set_cursor_offset(len(self.current_line),reset_rl_history=False)
595595

596596
defprocess_simple_keypress(self,e):
597-
ifein (u"<Ctrl-j>",u"<Ctrl-m>",u"<PADENTER>"):
597+
ifein (u"<Ctrl-j>",u"<Ctrl-m>",u"<PADENTER>",u"\n",u"\r"):# '\n' necessary for pastes
598598
self.on_enter()
599599
whileself.fake_refresh_requested:
600600
self.fake_refresh_requested=False
@@ -607,7 +607,7 @@ def process_simple_keypress(self, e):
607607
self.add_normal_character(e)
608608

609609
defsend_current_block_to_external_editor(self,filename=None):
610-
text=self.send_to_external_editor(self.get_current_block())
610+
text=self.send_to_external_editor(self.get_current_block().encode('utf8'))
611611
lines= [lineforlineintext.split('\n')]
612612
whilelinesandnotlines[-1].split():
613613
lines.pop()
@@ -616,7 +616,6 @@ def send_current_block_to_external_editor(self, filename=None):
616616
withself.in_paste_mode():
617617
foreinevents:
618618
self.process_simple_keypress(e)
619-
self.current_line=''
620619
self.cursor_offset=len(self.current_line)
621620

622621
defsend_session_to_external_editor(self,filename=None):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp