Skip to content

Commit 8cb8991

Browse files
committed
[fix] rendering selection visuals
1 parent a8d5496 commit 8cb8991

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui/textbox/widget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ void ekg::ui::buffering(
15071507
&&
15081508
!is_complete_line_selected
15091509
) {
1510-
glyph_wsize += draw_font.space_wsize;
1510+
glyph_wsize = (glyph_wsize * !is_cursor_at_end_of_line) + draw_font.space_wsize;
15111511
}
15121512

15131513
ekg::vec2_t<size_t> next_char_index(next_line_index.x + 1, next_line_index.y);
@@ -1534,7 +1534,7 @@ void ekg::ui::buffering(
15341534
}
15351535

15361536
if (is_inline_selected) {
1537-
cursor.rect.x = pos.x;
1537+
cursor.rect.x = pos.x + end_cursor_position;
15381538
cursor.rect.y = pos.y;
15391539
cursor.rect.w = glyph_wsize;
15401540
cursor.rect.h = textbox.widget.rect_text_size.h;

0 commit comments

Comments
 (0)