Skip to content

Commit

Permalink
Making space for cursor only at line end
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Jan 3, 2024
1 parent ca9ddd5 commit f15ca05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textual/widgets/_text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ def render_line(self, widget_y: int) -> Strip:
line.tab_size = self.indent_width
virtual_width, virtual_height = self.virtual_size
expanded_width = max(virtual_width, self.size.width)
# line.set_length(expanded_length)
line.set_length(line.cell_len + 1) # Make space for cursor at end.

selection = self.selection
start, end = selection
Expand Down Expand Up @@ -938,7 +938,7 @@ def render_line(self, widget_y: int) -> Strip:
console = self.app.console
gutter_segments = console.render(gutter)
width, _ = self.size
section_width = width - self.gutter_width + 1
section_width = width - self.gutter_width
line.set_length(section_width)
text_segments = console.render(
line,
Expand Down

0 comments on commit f15ca05

Please sign in to comment.