From 3e23f44fc31cfbacec57622cd359702abd004a79 Mon Sep 17 00:00:00 2001 From: starnakin Date: Wed, 26 Jul 2023 14:44:04 +0200 Subject: [PATCH] add: delete --- src/commands/delete.🗿 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/commands/delete.🗿 diff --git a/src/commands/delete.🗿 b/src/commands/delete.🗿 new file mode 100644 index 0000000..988eacb --- /dev/null +++ b/src/commands/delete.🗿 @@ -0,0 +1,13 @@ +cmd_delete(text, args) +{ + local i; + + i = [text + LOCATION_CURRENT_LINE]; + [text + LOCATION_LENGTH] = [text + LOCATION_LENGTH] - 1; + loop + { + if (i == [text + LOCATION_LENGTH]) + return 0; + [[text + LOCATION_ARRAY] + i] = [[text + LOCATION_ARRAY] + i + 1]; + } +}