( tab, filename, line, column )
| 621 | |
| 622 | # Both |line| and |column| need to be 1-based |
| 623 | def TryJumpLocationInTab( tab, filename, line, column ): |
| 624 | for win in tab.windows: |
| 625 | if ComparePaths( GetBufferFilepath( win.buffer ), filename ): |
| 626 | vim.current.tabpage = tab |
| 627 | vim.current.window = win |
| 628 | if line is not None and column is not None: |
| 629 | vim.current.window.cursor = ( line, column - 1 ) |
| 630 | # Open possible folding at location |
| 631 | vim.command( 'normal! zv' ) |
| 632 | # Center the screen on the jumped-to location |
| 633 | vim.command( 'normal! zz' ) |
| 634 | |
| 635 | return True |
| 636 | # 'filename' is not opened in this tab page |
| 637 | return False |
| 638 | |
| 639 | |
| 640 | # Both |line| and |column| need to be 1-based |
no test coverage detected