Skip to content

Commit

Permalink
More #3481
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Sep 12, 2017
1 parent 3799cd7 commit 681ced1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions far/changelog
@@ -1,3 +1,7 @@
drkns 12.09.2017 21:04:02 +0100 - build 5028

1. Продолжение 0003481.

drkns 11.09.2017 20:45:30 +0100 - build 5027

1. 0003481: hlf: Текст может выравниваться не смотря на отсутствие <CtrlStartPosChar>
Expand Down
7 changes: 6 additions & 1 deletion far/help.cpp
Expand Up @@ -353,6 +353,7 @@ bool Help::ReadHelp(const string& Mask)
// Keeping them together to prevent overwriting paragraph-specific StartPos
// with the one from the next paragraph, if any.
std::pair<string, size_t> SplitLine;
bool SplitLineBegin = false;

const auto& AddSplitLine = [this](const std::pair<string, size_t>& Line)
{
Expand Down Expand Up @@ -608,6 +609,7 @@ bool Help::ReadHelp(const string& Mask)
if (StringLen(strReadStr) + StartPos < MaxLength)
{
AddLine(strReadStr, StartPos);
StartPos = 0;
continue;
}
}
Expand Down Expand Up @@ -646,6 +648,8 @@ bool Help::ReadHelp(const string& Mask)
}

SplitLine = { strReadStr, StartPos };
SplitLineBegin = true;

strReadStr.clear();
continue;
}
Expand Down Expand Up @@ -701,7 +705,8 @@ bool Help::ReadHelp(const string& Mask)
string FirstPart = SplitLine.first.substr(0, I);
if (StringLen(FirstPart) + SplitLine.second < MaxLength)
{
AddLine(FirstPart, SplitLine.second);
AddLine(FirstPart, SplitLineBegin? 0 : SplitLine.second);
SplitLineBegin = false;
SplitLine.first.erase(1, I);
SplitLine.first[0] = L' ';
HighlightsCorrection(SplitLine.first);
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,5027)m4_dnl
m4_define(BUILD,5028)m4_dnl

0 comments on commit 681ced1

Please sign in to comment.