diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-03-12 17:38:29 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-12 17:38:29 +0000 |
commit | 8b530b3158cbd3aee2ad9cad8e7b7964faabb51e (patch) | |
tree | 99b0896116b563eac5c2712e68fab6f7d78f4ba7 /src/tag.c | |
parent | d0b7bfa95798f5ec743d8afffbffb83aeac823da (diff) |
patch 8.2.4553: linear tag search is a bit slowv8.2.4553
Problem: Linear tag search is a bit slow.
Solution: Remove a vim_ftell() call. (Yegappan Lakshmanan, closes #9937)
Diffstat (limited to 'src/tag.c')
-rw-r--r-- | src/tag.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2092,10 +2092,7 @@ findtags_get_next_line(findtags_state_T *st, tagsearch_info_T *sinfo_p) eof = cs_fgets(st->lbuf, st->lbuf_size); else #endif - { - sinfo_p->curr_offset = vim_ftell(st->fp); eof = vim_fgets(st->lbuf, st->lbuf_size, st->fp); - } } while (!eof && vim_isblankline(st->lbuf)); if (eof) @@ -2850,7 +2847,7 @@ line_read_in: return; } - if (st->state == TS_STEP_FORWARD) + if (st->state == TS_STEP_FORWARD || st->state == TS_LINEAR) // Seek to the same position to read the same line again vim_ignored = vim_fseek(st->fp, search_info.curr_offset, SEEK_SET); |