tex: advance a single line for each line break - neatvi - [fork] simple vi-type editor with UTF-8 support
(HTM) git clone git://src.adamsgaard.dk/neatvi
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit e9a16a0778855b2c376333537b8331bdced600e6
(DIR) parent c90511855c86607fc0f66d88f2a306730d2138c9
(HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Thu, 15 Oct 2020 16:41:02 +0330
ex: advance a single line for each line break
Diffstat:
M ex.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/ex.c b/ex.c
t@@ -553,11 +553,9 @@ static int ec_print(char *ec)
int i;
ex_cmd(ec, cmd);
ex_loc(ec, loc);
- if (!cmd[0] && !loc[0]) {
- if (xrow >= lbuf_len(xb) - 1)
+ if (!cmd[0] && !loc[0])
+ if (xrow >= lbuf_len(xb))
return 1;
- xrow = xrow + 1;
- }
if (ex_region(loc, &beg, &end))
return 1;
for (i = beg; i < end; i++)