Compare commits

..

2 Commits

Author SHA1 Message Date
e4dfffa315 rename file to buffer 2023-07-26 14:35:15 +02:00
6538b48c48 add: numered 2023-07-26 14:34:56 +02:00
2 changed files with 13 additions and 1 deletions

12
src/commands/numered.🗿 Normal file
View File

@ -0,0 +1,12 @@
cmd_numbered(text, args)
{
if ([text + LOCATION_LENGTH] == 0)
{
putstr("Empty buffer\n");
return 1;
}
putnum([text + LOCATION_CURRENT_LINE] + 1);
putchar('\t');
putstr([[text + LOCATION_ARRAY] + [text + LOCATION_CURRENT_LINE]]);
putchar('\n');
}

View File

@ -2,7 +2,7 @@ cmd_print(text, args)
{ {
if ([text + LOCATION_LENGTH] == 0) if ([text + LOCATION_LENGTH] == 0)
{ {
putstr("Empty file\n"); putstr("Empty buffer\n");
return 1; return 1;
} }
putstr([[text + LOCATION_ARRAY] + [text + LOCATION_CURRENT_LINE]]); putstr([[text + LOCATION_ARRAY] + [text + LOCATION_CURRENT_LINE]]);