Limit the max number of lines to extend URLs over

This commit is contained in:
Kovid Goyal 2017-12-13 12:18:35 +05:30
parent 95683c658b
commit c81a8216dc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -144,7 +144,8 @@ drag_scroll(Window *w, OSWindow *frame) {
static inline void
extend_url(Screen *screen, Line *line, index_type *x, index_type *y) {
while(true) {
unsigned int count = 0;
while(count++ < 10) {
if (*x != line->xnum - 1) break;
line = screen_visual_line(screen, *y + 1);
if (!line) break; // we deliberately allow non-continued lines as some programs, like mutt split URLs with newlines at line boundaries