/* Either scrolls to specific line number (when specified) or to the bottom of * the view. */ static void cmd_G(key_info_t key_info, keys_info_t *keys_info) { if(key_info.count != NO_COUNT_GIVEN) { cmd_g(key_info, keys_info); return; } if(scroll_to_bottom(vi)) { draw(); } }
static void cmd_G(key_info_t key_info, keys_info_t *keys_info) { if(key_info.count != NO_COUNT_GIVEN) { cmd_g(key_info, keys_info); return; } if(vi->linev + 1 + vi->view->window_rows - 1 > vi->nlinesv) return; vi->linev = vi->nlinesv - (vi->view->window_rows - 1); for(vi->line = 0; vi->line < vi->nlines - 1; vi->line++) if(vi->linev < vi->widths[vi->line + 1][0]) break; draw(); }