Skip to content

Commit

Permalink
minor addition to elfmz#2395
Browse files Browse the repository at this point in the history
  • Loading branch information
elfmz committed Oct 5, 2024
1 parent b57218a commit 2d27844
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion far2l/src/vt/vtcompletor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,13 @@ bool VTCompletor::TalkWithShell(const std::string &cmd, std::string &reply, cons
fclose(f);
}

size_t p = reply.find(begin);
size_t p = reply.find(begin + '\n');
if (p == std::string::npos) {
p = reply.find(begin + '\r');
}
if (p != std::string::npos) {
reply.erase(0, p + begin.size());
StrTrimLeft(reply, "\r\n");
}
for (;;) {
p = reply.rfind('\a');
Expand Down

0 comments on commit 2d27844

Please sign in to comment.