wrapping: we're still on the same line if the next line has not changed
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.
Этот коммит содержится в:
родитель
29f7654ab1
Коммит
b4411b4f28
@ -1679,6 +1679,9 @@ int do_input(bool allow_funcs)
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_WRAPPING
|
||||||
|
filestruct *was_next = openfile->current->next;
|
||||||
|
#endif
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
filestruct *was_current = openfile->current;
|
filestruct *was_current = openfile->current;
|
||||||
size_t was_x = openfile->current_x;
|
size_t was_x = openfile->current_x;
|
||||||
@ -1704,7 +1707,7 @@ int do_input(bool allow_funcs)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_WRAPPING
|
#ifdef ENABLE_WRAPPING
|
||||||
/* If the cursor moved to another line, clear the prepend flag. */
|
/* If the cursor moved to another line, clear the prepend flag. */
|
||||||
if (openfile->current != was_current)
|
if (openfile->current->next != was_next)
|
||||||
wrap_reset();
|
wrap_reset();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user