/* * Check all file marks for a name that matches the file name in buf. * May replace the name with an fnum. * Used for marks that come from the .shada file. */ void fmarks_check_names(buf_T *buf) { char_u *name = buf->b_ffname; int i; if (buf->b_ffname == NULL) return; for (i = 0; i < NGLOBALMARKS; ++i) fmarks_check_one(&namedfm[i], name, buf); FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { for (i = 0; i < wp->w_jumplistlen; ++i) { fmarks_check_one(&wp->w_jumplist[i], name, buf); } } }
/* * Check all file marks for a name that matches the file name in buf. * May replace the name with an fnum. * Used for marks that come from the .viminfo file. */ void fmarks_check_names(buf_T *buf) { char_u *name; int i; if (buf->b_ffname == NULL) return; name = home_replace_save(buf, buf->b_ffname); for (i = 0; i < NMARKS + EXTRA_MARKS; ++i) fmarks_check_one(&namedfm[i], name, buf); FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { for (i = 0; i < wp->w_jumplistlen; ++i) { fmarks_check_one(&wp->w_jumplist[i], name, buf); } } free(name); }