Commit Graph

8 Commits

Author SHA1 Message Date
a3b00e09d8 port over bug fixes from mutually recursive functions from test-builder-with-cursor.sml to text-builder-with-highlight.sml 2025-09-13 03:02:13 +01:00
916e94eaaa fix bug: when we want to skip to next line in TextBuilderWithCursor, we were using binary search on the search list. The search list contained the indices of matched searches, but what we wanted to use binary search on are the lines, as the lines can help us find the next linebreak if any. So, we perform binary search on the lines vector this time to fix the bug. 2025-09-13 02:48:07 +01:00
20a542df29 in BinSearch.equalOrMore and BinSearch.equalOrLess, return ~1 if no item is found, for the sake of less ambiguity in usage. Functions that call these have also been adapted. 2025-09-13 02:18:14 +01:00
295bdc35cf fix bug where some lines were not scrolling horizontally properly. The issue was that, when encountering a line break in 'skipToFirstVisualColumn' function, we should have recursively called the 'skipToFirstVisualColumn' function instead of the 'build' function. The reason is that our current column after a line break is 0, but we don't know if the start column to display is necessarily 0 in all cases. 2025-09-13 00:14:07 +01:00
b9e2da3ff9 add function to skip to first visible column in TextBuilderWithCursor (sometimes the function is buggy, which I need to fix) 2025-09-13 00:02:44 +01:00
422d6ad9ac fix bugs in implementing and using text buffer. Some functions did not save the drawMsg to the app's state, which we means we didn't draw in those cases. The text builder functions also drew cursors on characters even when the cursor is not at this position. Both of these bugs are fixed. 2025-09-12 23:21:53 +01:00
77a64ae794 previously forgot to draw char in text builder, but we do that now 2025-09-12 14:02:38 +01:00
b6de188f7d create a separate directory for different text builders 2025-09-12 08:57:17 +01:00