Patch 8.1.2152
Problem: Problems navigating tags file on MacOS Catalina.
Solution: Use fseek instead of lseek. (John Lamb, fixes #5061)
Files: src/tag.c
*** ../vim-8.1.2151/src/tag.c 2019-08-21 14:36:29.395376065 +0200
--- src/tag.c 2019-10-15 22:20:31.885463289 +0200
***************
*** 2198,2220 ****
#endif
#ifdef FEAT_TAG_BINS
! /*
! * When starting a binary search, get the size of the file and
! * compute the first offset.
! */
if (state == TS_BINARY)
{
! /* Get the tag file size (don't use mch_fstat(), it's not
! * portable). */
! if ((filesize = vim_lseek(fileno(fp),
! (off_T)0L, SEEK_END)) <= 0)
state = TS_LINEAR;
else
{
! vim_lseek(fileno(fp), (off_T)0L, SEEK_SET);
! /* Calculate the first read offset in the file. Start
! * the search in the middle of the file. */
search_info.low_offset = 0;
search_info.low_char = 0;
search_info.high_offset = filesize;
--- 2198,2220 ----
#endif
#ifdef FEAT_TAG_BINS
! // When starting a binary search, get the size of the file and
! // compute the first offset.
if (state == TS_BINARY)
{
! if (vim_fseek(fp, 0L, SEEK_END) != 0)
! // can't seek, don't use binary search
state = TS_LINEAR;
else
{
! // Get the tag file size (don't use mch_fstat(), it's
! // not portable). Don't use lseek(), it doesn't work
! // properly on MacOS Catalina.
! filesize = vim_ftell(fp);
! vim_fseek(fp, 0L, SEEK_SET);
! // Calculate the first read offset in the file. Start
! // the search in the middle of the file.
search_info.low_offset = 0;
search_info.low_char = 0;
search_info.high_offset = filesize;
*** ../vim-8.1.2151/src/version.c 2019-10-14 22:26:16.619956247 +0200
--- src/version.c 2019-10-15 22:23:24.992016047 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 2152,
/**/
--
It is illegal to take more than three sips of beer at a time while standing.
[real standing law in Texas, United States of America]
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201910152026.x9FKQ4kV013085%40masaka.moolenaar.net.