softwrap: don't scroll half a page when just a few lines will do
This fixes https://savannah.gnu.org/bugs/?49824.master
parent
13176792f0
commit
8d692a87dc
|
@ -1767,6 +1767,10 @@ int do_mouse(void)
|
||||||
((mouse_y - current_row) * editwincols) + mouse_x);
|
((mouse_y - current_row) * editwincols) + mouse_x);
|
||||||
} else
|
} else
|
||||||
openfile->current_x = actual_x(openfile->current->data, mouse_x);
|
openfile->current_x = actual_x(openfile->current->data, mouse_x);
|
||||||
|
|
||||||
|
openfile->current_y = current_row;
|
||||||
|
ensure_line_is_visible();
|
||||||
|
refresh_needed = TRUE;
|
||||||
} else
|
} else
|
||||||
#endif /* NANO_TINY */
|
#endif /* NANO_TINY */
|
||||||
{
|
{
|
||||||
|
@ -1796,6 +1800,7 @@ int do_mouse(void)
|
||||||
/* The cursor moved; clean the cutbuffer on the next cut. */
|
/* The cursor moved; clean the cutbuffer on the next cut. */
|
||||||
cutbuffer_reset();
|
cutbuffer_reset();
|
||||||
|
|
||||||
|
if (!ISSET(SOFTWRAP))
|
||||||
edit_redraw(current_save);
|
edit_redraw(current_save);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue