~torresjrjr/public-inbox

ed: fix warnbuffermodified bug v1 SUPERSEDED

Curtis Arthaud: 1
 fix warnbuffermodified bug

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~torresjrjr/public-inbox/patches/50250/mbox | git am -3
Learn more about email & git

[PATCH ed] fix warnbuffermodified bug Export this patch

Signed-off-by: Curtis Arthaud <uku82@gmx.fr>
---
 command.ha | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/command.ha b/command.ha
index ccace0e..3340d20 100644
--- a/command.ha
+++ b/command.ha
@@ -734,7 +734,7 @@ fn cmd_write(s: *Session, cmd: *Command) (void | Error) = {
	if (!s.suppressmode)
		fmt::println(sz)!;

	if (a == 1 && b == len(s.buf.lines))
	if (a == 1 && b == len(s.buf.lines)-1)
		// the entire buffer has been written.
		s.buf.modified = false;

--
2.44.0
Please ignore this patch,
it doesn't work correctly.
I think we need a deeper rework of the buffermodified logic,
I will look into it (possibly a bit slowly).