From e38bec4f46023990373f32009a77a137cc9ee5b5 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 14 Jun 2022 08:15:51 -0700 Subject: go through and fix similar issues All places where string.sub was being passed a _pos variable. --- manual_tests | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'manual_tests') diff --git a/manual_tests b/manual_tests index 8ca2893..4fbe02d 100644 --- a/manual_tests +++ b/manual_tests @@ -1,3 +1,10 @@ +-- static properties of the code +All strings are UTF-8. Bytes within them are not characters. +I try to label byte offsets as _offset, and character positions as _pos. +For example, string.sub should never use a _pos to substring, only an _offset. +Wish I had some static typing here. We're not going to try to write tests to catch issues like this. + +-- manual tests file load: cursor_line = 1 first line is a drawing -> cursor_line = 2 -- cgit 1.4.1-2-gfad0