mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
wrapping: keep prepending to the same next line as long as possible
Only when the cursor has moved off of the currrent line do we stop prepending wrapped words to the next line. This partially fixes https://savannah.gnu.org/bugs/?52576.
This commit is contained in:
parent
66fd6a5ab1
commit
29f7654ab1
12
src/nano.c
12
src/nano.c
@ -1635,13 +1635,6 @@ int do_input(bool allow_funcs)
|
||||
* all available characters in the input puddle. Note that this
|
||||
* puddle will be empty if we're in view mode. */
|
||||
if (have_shortcut || get_key_buffer_len() == 0) {
|
||||
#ifdef ENABLE_WRAPPING
|
||||
/* If we got a shortcut or toggle, and it's not the shortcut
|
||||
* for verbatim input, turn off prepending of wrapped text. */
|
||||
if (have_shortcut && s->scfunc != do_verbatim_input)
|
||||
wrap_reset();
|
||||
#endif
|
||||
|
||||
if (puddle != NULL) {
|
||||
/* Insert all bytes in the input buffer into the edit buffer
|
||||
* at once, filtering out any low control codes. */
|
||||
@ -1709,6 +1702,11 @@ int do_input(bool allow_funcs)
|
||||
refresh_needed = TRUE;
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_WRAPPING
|
||||
/* If the cursor moved to another line, clear the prepend flag. */
|
||||
if (openfile->current != was_current)
|
||||
wrap_reset();
|
||||
#endif
|
||||
#ifdef ENABLE_COLOR
|
||||
if (f && !f->viewok)
|
||||
check_the_multis(openfile->current);
|
||||
|
Loading…
Reference in New Issue
Block a user