From e0ccf1de675d8b84553a8692d4616020f420e93e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 14 Oct 2024 13:54:03 -0700 Subject: bugfix: Unicode --- source_text.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source_text.lua') diff --git a/source_text.lua b/source_text.lua index 9125cb0..284ed00 100644 --- a/source_text.lua +++ b/source_text.lua @@ -90,9 +90,9 @@ function Text.screen_line(line, line_cache, i) if i >= #line_cache.screen_line_starting_pos then return line.data:sub(offset) end - local endpos = line_cache.screen_line_starting_pos[i+1]-1 + local endpos = line_cache.screen_line_starting_pos[i+1] local end_offset = Text.offset(line.data, endpos) - return line.data:sub(offset, end_offset) + return line.data:sub(offset, end_offset-1) end function Text.draw_cursor(State, x, y) -- cgit 1.4.1-2-gfad0