comparison src/normal.c @ 21703:22583b9d4efd v8.2.1401

patch 8.2.1401: cannot jump to the last used tabpage Commit: https://github.com/vim/vim/commit/62a232506d06f6d1b3b7271801c907d6294dfe84 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 9 14:04:42 2020 +0200 patch 8.2.1401: cannot jump to the last used tabpage Problem: Cannot jump to the last used tabpage. Solution: Add g<Tab> and tabpagnr('#'). (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/6661, neovim #11626)
author Bram Moolenaar <Bram@vim.org>
date Sun, 09 Aug 2020 14:15:04 +0200
parents b530a433fe7d
children f65e76638eb5
comparison
equal deleted inserted replaced
21702:b63fb341c0da 21703:22583b9d4efd
5440 foldOpenCursor(); 5440 foldOpenCursor();
5441 #endif 5441 #endif
5442 } 5442 }
5443 5443
5444 /* 5444 /*
5445 * Handle CTRL-O, CTRL-I, "g;" and "g," commands. 5445 * Handle CTRL-O, CTRL-I, "g;", "g," and "CTRL-Tab" commands.
5446 */ 5446 */
5447 static void 5447 static void
5448 nv_pcmark(cmdarg_T *cap) 5448 nv_pcmark(cmdarg_T *cap)
5449 { 5449 {
5450 #ifdef FEAT_JUMPLIST 5450 #ifdef FEAT_JUMPLIST
5454 int old_KeyTyped = KeyTyped; // getting file may reset it 5454 int old_KeyTyped = KeyTyped; // getting file may reset it
5455 # endif 5455 # endif
5456 5456
5457 if (!checkclearopq(cap->oap)) 5457 if (!checkclearopq(cap->oap))
5458 { 5458 {
5459 if (cap->cmdchar == TAB && mod_mask == MOD_MASK_CTRL)
5460 {
5461 if (goto_tabpage_lastused() == FAIL)
5462 clearopbeep(cap->oap);
5463 return;
5464 }
5459 if (cap->cmdchar == 'g') 5465 if (cap->cmdchar == 'g')
5460 pos = movechangelist((int)cap->count1); 5466 pos = movechangelist((int)cap->count1);
5461 else 5467 else
5462 pos = movemark((int)cap->count1); 5468 pos = movemark((int)cap->count1);
5463 if (pos == (pos_T *)-1) // jump to other file 5469 if (pos == (pos_T *)-1) // jump to other file
6306 goto_tabpage((int)cap->count0); 6312 goto_tabpage((int)cap->count0);
6307 break; 6313 break;
6308 case 'T': 6314 case 'T':
6309 if (!checkclearop(oap)) 6315 if (!checkclearop(oap))
6310 goto_tabpage(-(int)cap->count1); 6316 goto_tabpage(-(int)cap->count1);
6317 break;
6318
6319 case TAB:
6320 if (!checkclearop(oap) && goto_tabpage_lastused() == FAIL)
6321 clearopbeep(oap);
6311 break; 6322 break;
6312 6323
6313 case '+': 6324 case '+':
6314 case '-': // "g+" and "g-": undo or redo along the timeline 6325 case '-': // "g+" and "g-": undo or redo along the timeline
6315 if (!checkclearopq(oap)) 6326 if (!checkclearopq(oap))