[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH v2 2/2] wrapping: we're still on the same line if th
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH v2 2/2] wrapping: we're still on the same line if the next line has not changed |
Date: |
Mon, 4 Dec 2017 19:11:47 +0100 |
In this way we can delete things on the current line with ^K (after
Shift-selecting some text) without nano misdetecting a line change,
This fully fixes https://savannah.gnu.org/bugs/?52576.
---
src/nano.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/nano.c b/src/nano.c
index 5e4bb0d9..0da1bd5a 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1679,6 +1679,9 @@ int do_input(bool allow_funcs)
} else
#endif
{
+#ifdef ENABLE_WRAPPING
+ filestruct *was_next = openfile->current->next;
+#endif
#ifndef NANO_TINY
filestruct *was_current = openfile->current;
size_t was_x = openfile->current_x;
@@ -1704,7 +1707,7 @@ int do_input(bool allow_funcs)
#endif
#ifdef ENABLE_WRAPPING
/* If the cursor moved to another line, clear the prepend flag. */
- if (openfile->current != was_current)
+ if (openfile->current->next != was_next)
wrap_reset();
#endif
#ifdef ENABLE_COLOR
--
2.14.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nano-devel] [PATCH v2 2/2] wrapping: we're still on the same line if the next line has not changed,
Benno Schulenberg <=