Skip to content

Commit

Permalink
Add new behavior to \n
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbautista committed Aug 27, 2024
1 parent d54f69b commit b492920
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qtconsole/console_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2220,7 +2220,9 @@ def _insert_plain_text(self, cursor, text, flush=False):
QtGui.QTextCursor.MoveAnchor)

elif act.action == 'newline':
cursor.movePosition(QtGui.QTextCursor.EndOfLine)
if not cursor.movePosition(QtGui.QTextCursor.NextBlock):
cursor.movePosition(QtGui.QTextCursor.EndOfLine)
cursor.insertText('\n')

# simulate replacement mode
if substring is not None:
Expand Down

0 comments on commit b492920

Please sign in to comment.