mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Alt-J in .log improved
This commit is contained in:
parent
71ead17f76
commit
ffa3f32cd6
1 changed files with 4 additions and 1 deletions
|
|
@ -157,11 +157,14 @@ bool Ide::FindLOG()
|
|||
LogLine bestl;
|
||||
int best = -1;
|
||||
int bestp = false;
|
||||
int bestr = INT_MIN;
|
||||
for(const LogLine& l : logs) {
|
||||
int ml = GetMatchLen(l.text, ln);
|
||||
if(ml > best || ml == best && l.priority > bestp) {
|
||||
int rest = ml - l.text.GetCount();
|
||||
if(CombineCompare(ml, best)(rest, bestr)(l.priority, bestp) > 0) {
|
||||
best = ml;
|
||||
bestp = l.priority;
|
||||
bestr = rest;
|
||||
bestl = l;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue