Skip to content

Commit a3bd35c

Browse files
authored
fix opening links (#999)
1 parent 8b1e2d3 commit a3bd35c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/stc/link.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Name: link.cpp
33
// Purpose: Implementation of class wex::link and stc::link... methods
44
// Author: Anton van Wezenbeek
5-
// Copyright: (c) 2011-2024 Anton van Wezenbeek
5+
// Copyright: (c) 2011-2025 Anton van Wezenbeek
66
////////////////////////////////////////////////////////////////////////////////
77

88
#include <boost/algorithm/string.hpp>
@@ -20,7 +20,8 @@
2020
// failed to determine attributes for the specified path: File name too long
2121
std::string get_current_line_text(wex::link* link, wex::factory::stc* stc)
2222
{
23-
const std::string& line(stc->GetCurLine().ToStdString());
23+
// Do not make a reference.
24+
const std::string line(stc->GetCurLine());
2425

2526
if (const size_t mp(500); line.size() >= mp)
2627
{
@@ -147,7 +148,7 @@ bool wex::stc::link_open(link_t mode, std::string* link)
147148
this));
148149
!mime.string().empty())
149150
{
150-
found = (!mode[LINK_CHECK]) ? mime.open_mime(): true;
151+
found = (!mode[LINK_CHECK]) ? mime.open_mime() : true;
151152
}
152153
}
153154
}

0 commit comments

Comments
 (0)