From 5bfafe3987ca0ab15f2103f65addf950a1df31eb Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Sat, 6 Sep 2025 03:07:01 +0100 Subject: [PATCH] replace redundant code (which matched semantics of a newly added function) with a function call. --- fcore/normal-mode/normal-delete.sml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/fcore/normal-mode/normal-delete.sml b/fcore/normal-mode/normal-delete.sml index e2148c1..9e1efb8 100644 --- a/fcore/normal-mode/normal-delete.sml +++ b/fcore/normal-mode/normal-delete.sml @@ -26,18 +26,7 @@ struct (* equivalent of vi's 'x' command **) fun helpRemoveChr (app: app_type, buffer, cursorIdx, count, time) = if count = 0 then - let - val searchString = #searchString app - val buffer = LineGap.goToStart buffer - val initialMsg = [SEARCH (buffer, searchString)] - - val buffer = LineGap.goToIdx (cursorIdx - 1111, buffer) - val searchList = - SearchList.buildRange (buffer, searchString, cursorIdx + 1111) - in - NormalFinish.buildTextAndClear - (app, buffer, cursorIdx, searchList, initialMsg, time) - end + finishAfterDeletingBuffer (app, cursorIdx, buffer, time) else let val buffer = LineGap.goToIdx (cursorIdx, buffer)