shada: Reassign some entry types to WantInfo and WantMarks

kShaDaWantMarks now loads only local file change list and file-local marks.
kShaDaWantInfo now loads global marks and jump list.
This commit is contained in:
ZyX 2015-07-05 02:37:37 +03:00
parent 42536abd33
commit 941ec54aa1
2 changed files with 5 additions and 5 deletions

View File

@ -536,7 +536,7 @@ static void shada_read(FILE *const fp, const int flags)
}
case kSDItemJump:
case kSDItemGlobalMark: {
if (!(flags & kShaDaWantMarks)
if (!(flags & kShaDaWantInfo)
|| (cur_entry.type == kSDItemGlobalMark
&& get_viminfo_parameter('f') == 0)) {
shada_free_shada_entry(&cur_entry);
@ -1734,9 +1734,9 @@ shada_read_next_item_start:
}
break;
}
case kSDItemBufferList:
case kSDItemChange:
case kSDItemGlobalMark:
case kSDItemJump:
case kSDItemBufferList:
case kSDItemVariable:
case kSDItemRegister:
case kSDItemHistoryEntry:
@ -1747,7 +1747,7 @@ shada_read_next_item_start:
}
break;
}
case kSDItemGlobalMark:
case kSDItemChange:
case kSDItemLocalMark: {
if (!(flags & kShaDaWantMarks)) {
SKIP;

View File

@ -6,7 +6,7 @@ typedef long ShadaPosition;
/// Flags for shada_read_file and children
enum {
kShaDaWantInfo = 1, ///< Load non-mark information
kShaDaWantMarks = 2, ///< Load file marks
kShaDaWantMarks = 2, ///< Load local file marks and change list
kShaDaForceit = 4, ///< Overwrite info already read
kShaDaGetOldfiles = 8, ///< Load v:oldfiles.
kShaDaWantHeader = 16, ///< Do not skip header (shada_read_next_item).