ed

[hare] The standard editor
Log | Files | Refs | README | LICENSE

commit 28acdfba98e04cc216f2abf6a866931375058db6
parent eebb93c12779152dd7db0525fcacefb2e3a5b84e
Author: Byron Torres <b@torresjrjr.com>
Date:   Tue, 11 Apr 2023 01:00:39 +0100

fix invalid const assignment

Diffstat:
Mcommand.ha | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/command.ha b/command.ha @@ -308,9 +308,7 @@ fn cmd_helpmode(s: *session, cmd: *command) (void | error) = { fn cmd_insert(s: *session, cmd: *command) (void | error) = { const n = get_linenum(cmd.linenums, s.buf.cursor); - if (n == 0) { - n = 1; - }; + const n = if (n == 0) 1z else n; for (let i = 0z; i < len(cmd.input); i += 1) { const l = alloc(line { text = cmd.input[i], ... });