Mercurial > vim
comparison runtime/doc/tabpage.txt @ 27903:d19b7aee1925
Update runtime files.
Commit: https://github.com/vim/vim/commit/c51cf0329809c7ae946c59d6f56699227efc9d1b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 26 12:25:45 2022 +0000
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Feb 2022 13:30:04 +0100 |
parents | 063952f68595 |
children | dc4de65a7fb7 |
comparison
equal
deleted
inserted
replaced
27902:8481c8908b5e | 27903:d19b7aee1925 |
---|---|
379 function MyTabLine() | 379 function MyTabLine() |
380 let s = '' | 380 let s = '' |
381 for i in range(tabpagenr('$')) | 381 for i in range(tabpagenr('$')) |
382 " select the highlighting | 382 " select the highlighting |
383 if i + 1 == tabpagenr() | 383 if i + 1 == tabpagenr() |
384 let s .= '%#TabLineSel#' | 384 let s ..= '%#TabLineSel#' |
385 else | 385 else |
386 let s .= '%#TabLine#' | 386 let s ..= '%#TabLine#' |
387 endif | 387 endif |
388 | 388 |
389 " set the tab page number (for mouse clicks) | 389 " set the tab page number (for mouse clicks) |
390 let s .= '%' . (i + 1) . 'T' | 390 let s ..= '%' .. (i + 1) .. 'T' |
391 | 391 |
392 " the label is made by MyTabLabel() | 392 " the label is made by MyTabLabel() |
393 let s .= ' %{MyTabLabel(' . (i + 1) . ')} ' | 393 let s ..= ' %{MyTabLabel(' .. (i + 1) .. ')} ' |
394 endfor | 394 endfor |
395 | 395 |
396 " after the last tab fill with TabLineFill and reset tab page nr | 396 " after the last tab fill with TabLineFill and reset tab page nr |
397 let s .= '%#TabLineFill#%T' | 397 let s ..= '%#TabLineFill#%T' |
398 | 398 |
399 " right-align the label to close the current tab page | 399 " right-align the label to close the current tab page |
400 if tabpagenr('$') > 1 | 400 if tabpagenr('$') > 1 |
401 let s .= '%=%#TabLine#%999Xclose' | 401 let s ..= '%=%#TabLine#%999Xclose' |
402 endif | 402 endif |
403 | 403 |
404 return s | 404 return s |
405 endfunction | 405 endfunction |
406 | 406 |
459 endfor | 459 endfor |
460 | 460 |
461 " Append the number of windows in the tab page if more than one | 461 " Append the number of windows in the tab page if more than one |
462 let wincount = tabpagewinnr(v:lnum, '$') | 462 let wincount = tabpagewinnr(v:lnum, '$') |
463 if wincount > 1 | 463 if wincount > 1 |
464 let label .= wincount | 464 let label ..= wincount |
465 endif | 465 endif |
466 if label != '' | 466 if label != '' |
467 let label .= ' ' | 467 let label ..= ' ' |
468 endif | 468 endif |
469 | 469 |
470 " Append the buffer name | 470 " Append the buffer name |
471 return label . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1]) | 471 return label .. bufname(bufnrlist[tabpagewinnr(v:lnum) - 1]) |
472 endfunction | 472 endfunction |
473 | 473 |
474 set guitablabel=%{GuiTabLabel()} | 474 set guitablabel=%{GuiTabLabel()} |
475 | 475 |
476 Note that the function must be defined before setting the option, otherwise | 476 Note that the function must be defined before setting the option, otherwise |