commit fb8dcd1c494b0339067ca13f5bfc8ac8a1a43114 from: Omar Polo date: Tue Jan 18 14:06:40 2022 UTC move TAB_LAZY flipping from switch_to_tab in load_url load_url needs to know when a tab passes from lazy to not lazy to correctly saves the scrolling position (see follow-up commit.) commit - 4aaf5de005720fd3086c249f6854b51a6c86ea92 commit + fb8dcd1c494b0339067ca13f5bfc8ac8a1a43114 blob - b070ca002778f80064455071d2758eb31344edb0 blob + 790195bb33d1651223326661d482d5e7e1fd4c5d --- session.c +++ session.c @@ -37,10 +37,8 @@ switch_to_tab(struct tab *tab) current_tab = tab; tab->flags &= ~TAB_URGENT; - if (operating && tab->flags & TAB_LAZY) { - tab->flags ^= TAB_LAZY; + if (operating && tab->flags & TAB_LAZY) load_url_in_tab(tab, tab->hist_cur->h, NULL, LU_MODE_NOHIST); - } } unsigned int blob - c88eb65e440c6ab6fda841daf34ea245907a3538 blob + e007d4345d0e2975492b7aa7aec39768fbde46e8 --- telescope.c +++ telescope.c @@ -967,6 +967,11 @@ load_url(struct tab *tab, const char *url, const char int lazy = tab->flags & TAB_LAZY; int nohist = mode & LU_MODE_NOHIST; + if (operating && lazy) { + tab->flags ^= TAB_LAZY; + lazy = 0; + } + if (!nohist && (!lazy || tab->hist_cur == NULL)) { if (tab->hist_cur != NULL) { get_scroll_position(tab, &tab->hist_cur->line_off,