folding: Always write fold data to file
This commit is contained in:
parent
663112ba03
commit
9b920c7892
1 changed files with 13 additions and 14 deletions
|
@ -108,6 +108,7 @@ struct Writer {
|
||||||
WriteIfNotZero("Scroll Position: ", properties.scroll_position);
|
WriteIfNotZero("Scroll Position: ", properties.scroll_position);
|
||||||
WriteIfNotZero("Active Line: ", properties.active_row);
|
WriteIfNotZero("Active Line: ", properties.active_row);
|
||||||
WriteIfNotZero("Video Position: ", properties.video_position);
|
WriteIfNotZero("Video Position: ", properties.video_position);
|
||||||
|
}
|
||||||
|
|
||||||
std::string foldsdata;
|
std::string foldsdata;
|
||||||
for (LineFold fold : properties.folds) {
|
for (LineFold fold : properties.folds) {
|
||||||
|
@ -120,10 +121,8 @@ struct Writer {
|
||||||
foldsdata += ":";
|
foldsdata += ":";
|
||||||
foldsdata += fold.collapsed ? "1" : "0";
|
foldsdata += fold.collapsed ? "1" : "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteIfNotEmpty("Line Folds: ", foldsdata);
|
WriteIfNotEmpty("Line Folds: ", foldsdata);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void WriteIfNotEmpty(const char *key, std::string const& value) {
|
void WriteIfNotEmpty(const char *key, std::string const& value) {
|
||||||
if (!value.empty())
|
if (!value.empty())
|
||||||
|
|
Loading…
Reference in a new issue