Skip to content

Commit

Permalink
fixed TextField cursor going down two lines when pressing enter.
Browse files Browse the repository at this point in the history
  • Loading branch information
pokepetter committed Jun 18, 2023
1 parent 533501c commit 1cb6e38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ursina/prefabs/text_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ def input(self, key):
if l.lstrip().startswith('class ') or l.lstrip().startswith('def '):
indent += 4

self.cursor.y += 1
self.cursor.x = 0
add_text(' '*indent)
return
Expand Down Expand Up @@ -872,7 +871,7 @@ def draw_selection(self):
# Text.default_font = 'consola.ttf'
# Text.default_resolution = 16*2
# TreeView()
te = TextField(max_lines=20, register_mouse_input=True, text='1234')
te = TextField(max_lines=200, register_mouse_input=True, text='1234')
#te = TextField(max_lines=300, scale=1, register_mouse_input = True, scroll_size = (50,3))
te.line_numbers.enabled = True
# for name in color.color_names:
Expand Down

0 comments on commit 1cb6e38

Please sign in to comment.