From 681ced1b800e2e417fab18453cf5e7ebc0abb5da Mon Sep 17 00:00:00 2001 From: Alex Alabuzhev Date: Tue, 12 Sep 2017 20:05:02 +0000 Subject: [PATCH] More #3481 --- far/changelog | 4 ++++ far/help.cpp | 7 ++++++- far/vbuild.m4 | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/far/changelog b/far/changelog index 2d96b656d2..5383ade216 100644 --- a/far/changelog +++ b/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: Текст может выравниваться не смотря на отсутствие diff --git a/far/help.cpp b/far/help.cpp index 5a9555b76a..bf87ea5583 100644 --- a/far/help.cpp +++ b/far/help.cpp @@ -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 SplitLine; + bool SplitLineBegin = false; const auto& AddSplitLine = [this](const std::pair& Line) { @@ -608,6 +609,7 @@ bool Help::ReadHelp(const string& Mask) if (StringLen(strReadStr) + StartPos < MaxLength) { AddLine(strReadStr, StartPos); + StartPos = 0; continue; } } @@ -646,6 +648,8 @@ bool Help::ReadHelp(const string& Mask) } SplitLine = { strReadStr, StartPos }; + SplitLineBegin = true; + strReadStr.clear(); continue; } @@ -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); diff --git a/far/vbuild.m4 b/far/vbuild.m4 index 655b4a1692..11e3d8fd5a 100644 --- a/far/vbuild.m4 +++ b/far/vbuild.m4 @@ -1 +1 @@ -m4_define(BUILD,5027)m4_dnl +m4_define(BUILD,5028)m4_dnl