From d871ac451fb14b3e9e9ae7c0f6f98d6570cf7230 Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Fri, 19 Sep 2025 03:04:10 +0100 Subject: [PATCH] restore temp.txt to previous state, as it was temporarily being edited for testing --- fcore/cursor-dfa/vi-hl-dfa.sml | 22 +++++++++++++++++++--- temp.txt | 4 ++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/fcore/cursor-dfa/vi-hl-dfa.sml b/fcore/cursor-dfa/vi-hl-dfa.sml index e1f5eb8..356bcc5 100644 --- a/fcore/cursor-dfa/vi-hl-dfa.sml +++ b/fcore/cursor-dfa/vi-hl-dfa.sml @@ -42,7 +42,14 @@ struct if counter - 1 = 0 then absIdx - 1 else - loop (idx + 1, absIdx + 1, str, tl, startState, counter - 1) + loop + ( idx + 1 + , absIdx + 1 + , str + , tl + , oneNewlineState + , counter - 1 + ) else if newState = notNewlineState then if counter - 1 = 0 then absIdx @@ -73,8 +80,17 @@ struct val newState = next (currentState, chr) in if newState = twoNewlineState then - if counter - 1 = 0 then absIdx - else loop (idx - 1, absIdx - 1, str, tl, newState, counter - 1) + if counter - 1 = 0 then + absIdx + else + loop + ( idx - 1 + , absIdx - 1 + , str + , tl + , oneNewlineState + , counter - 1 + ) else if newState = notNewlineState then if counter - 1 = 0 then absIdx diff --git a/temp.txt b/temp.txt index ccf1377..e9e1990 100644 --- a/temp.txt +++ b/temp.txt @@ -5,6 +5,10 @@ struct val ySpace = 25 val fontSize = 30.0 + fun accToDrawMsg (textAcc, cursorAcc) = + let + open MailboxType + open DrawMsg val textAcc = Vector.concat textAcc val cursorAcc = Vector.concat cursorAcc