Introduction
Introduction Statistics Contact Development Disclaimer Help
tvi: repeating . and @ commands - neatvi - [fork] simple vi-type editor with UT…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit df9f5a424f9e869ce1367f3c9ee3ceee84683f9f
parent 3846d47a04c5febd2c81aa1668832f56960f1617
Author: Ali Gholami Rudi <[email protected]>
Date: Sat, 7 May 2016 20:51:15 +0430
vi: repeating . and @ commands
Diffstat:
M vi.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/vi.c b/vi.c
t@@ -1021,7 +1021,9 @@ static int rep_len;
static void vc_repeat(void)
{
- term_push(rep_cmd, rep_len);
+ int i;
+ for (i = 0; i < MAX(1, vi_arg1); i++)
+ term_push(rep_cmd, rep_len);
}
static void vc_execute(void)
t@@ -1030,6 +1032,7 @@ static void vc_execute(void)
int lnmode;
int c = vi_read();
char *buf;
+ int i;
if (TK_INT(c))
return;
if (c == '@')
t@@ -1037,7 +1040,8 @@ static void vc_execute(void)
exec_buf = c;
buf = reg_get(exec_buf, &lnmode);
if (buf)
- term_push(buf, strlen(buf));
+ for (i = 0; i < MAX(1, vi_arg1); i++)
+ term_push(buf, strlen(buf));
}
static void vi(void)
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.