1
0
Fork 0

folding: Always write fold data to file

This commit is contained in:
arch1t3cht 2022-08-23 15:55:26 +02:00
parent 663112ba03
commit 9b920c7892
1 changed files with 13 additions and 14 deletions

View File

@ -108,6 +108,7 @@ struct Writer {
WriteIfNotZero("Scroll Position: ", properties.scroll_position);
WriteIfNotZero("Active Line: ", properties.active_row);
WriteIfNotZero("Video Position: ", properties.video_position);
}
std::string foldsdata;
for (LineFold fold : properties.folds) {
@ -120,10 +121,8 @@ struct Writer {
foldsdata += ":";
foldsdata += fold.collapsed ? "1" : "0";
}
WriteIfNotEmpty("Line Folds: ", foldsdata);
}
}
void WriteIfNotEmpty(const char *key, std::string const& value) {
if (!value.empty())