Skip to content

Commit

Permalink
Added macro DELEOL that deletes all characters of the current line, b…
Browse files Browse the repository at this point in the history
…eginning at the current cursor position.
  • Loading branch information
Michael Knigge committed Oct 20, 2022
1 parent 975b198 commit 50ab160
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions macros/deleol.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
void deleol(void)
{
int Col;
int Len;
char *Text;

Text = SpfService("query", "line_data");
Col = SpfService("query", "col_number");
Len = SpfService("query", "line_length");

if(Text && Col >= 1 && Col <= Len)
SPFservice("set", "line_data", StrGetSubstr(Text, 1, Col);
}

0 comments on commit 50ab160

Please sign in to comment.