[FarGroup/FarManager] master: far:regex: include offsets into match information (d236b2c29)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Oct 5, 2022, 12:30:49 PM10/5/22
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/d236b2c297e36af0c13567e77ac4f2d508714d4e

>---------------------------------------------------------------

commit d236b2c297e36af0c13567e77ac4f2d508714d4e
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Wed Oct 5 17:15:59 2022 +0100

far:regex: include offsets into match information


>---------------------------------------------------------------

d236b2c297e36af0c13567e77ac4f2d508714d4e
far/stddlg.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/far/stddlg.cpp b/far/stddlg.cpp
index 4ef724ad3..79988f486 100644
--- a/far/stddlg.cpp
+++ b/far/stddlg.cpp
@@ -1079,7 +1079,7 @@ void regex_playground()

const auto match_str = [&](RegExpMatch const& m)
{
- return m.start < 0? L""sv : TestStr.substr(m.start, m.end - m.start);
+ return m.start < 0? L""s : format(FSTR(L"{}-{} {}"sv), m.start, m.end, TestStr.substr(m.start, m.end - m.start));
};

for (const auto& [i, Index] : enumerate(Match))


Reply all
Reply to author
Forward
0 new messages