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 kSDItemJump:
case kSDItemGlobalMark: { case kSDItemGlobalMark: {
if (!(flags & kShaDaWantMarks) if (!(flags & kShaDaWantInfo)
|| (cur_entry.type == kSDItemGlobalMark || (cur_entry.type == kSDItemGlobalMark
&& get_viminfo_parameter('f') == 0)) { && get_viminfo_parameter('f') == 0)) {
shada_free_shada_entry(&cur_entry); shada_free_shada_entry(&cur_entry);
@ -1734,9 +1734,9 @@ shada_read_next_item_start:
} }
break; break;
} }
case kSDItemBufferList: case kSDItemGlobalMark:
case kSDItemChange:
case kSDItemJump: case kSDItemJump:
case kSDItemBufferList:
case kSDItemVariable: case kSDItemVariable:
case kSDItemRegister: case kSDItemRegister:
case kSDItemHistoryEntry: case kSDItemHistoryEntry:
@ -1747,7 +1747,7 @@ shada_read_next_item_start:
} }
break; break;
} }
case kSDItemGlobalMark: case kSDItemChange:
case kSDItemLocalMark: { case kSDItemLocalMark: {
if (!(flags & kShaDaWantMarks)) { if (!(flags & kShaDaWantMarks)) {
SKIP; SKIP;

View File

@ -6,7 +6,7 @@ typedef long ShadaPosition;
/// Flags for shada_read_file and children /// Flags for shada_read_file and children
enum { enum {
kShaDaWantInfo = 1, ///< Load non-mark information 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 kShaDaForceit = 4, ///< Overwrite info already read
kShaDaGetOldfiles = 8, ///< Load v:oldfiles. kShaDaGetOldfiles = 8, ///< Load v:oldfiles.
kShaDaWantHeader = 16, ///< Do not skip header (shada_read_next_item). kShaDaWantHeader = 16, ///< Do not skip header (shada_read_next_item).