mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: Context goto in .log now tries to detect source file path first (handles ASSERT log line)
This commit is contained in:
parent
5f44455bc2
commit
2aae7eee05
2 changed files with 30 additions and 3 deletions
|
|
@ -168,7 +168,9 @@ void CopyGitRevisions(const DropList& dl)
|
|||
s.TrimStart("\1");
|
||||
MergeWith(qtf, "&", s);
|
||||
}
|
||||
AppendClipboard(ParseQTF(qtf));
|
||||
RichText txt = ParseQTF(qtf);
|
||||
ClearClipboard();
|
||||
AppendClipboard(pick(txt));
|
||||
}
|
||||
|
||||
void LoadGitRevisions(DropList& r, const String& dir, const String& branch, const String& file)
|
||||
|
|
|
|||
|
|
@ -63,6 +63,33 @@ bool Ide::FindLOG()
|
|||
if(!IsInLogFile())
|
||||
return false;
|
||||
|
||||
String ln = editor.GetUtf8Line(editor.GetCursorLine());
|
||||
|
||||
for(const char *s = ln; *s;) { // try to find source file path first
|
||||
if(*s == ' ' || *s == '\t') {
|
||||
while(*s == ' ' || *s == '\t') s++;
|
||||
if(*s)
|
||||
for(const char *q = s + 1; *q; q++) {
|
||||
String path = String(s, q);
|
||||
if(FileExists(path)) {
|
||||
while(*q) {
|
||||
if(IsDigit(*q)) {
|
||||
AddHistory();
|
||||
EditFile(path);
|
||||
editor.SetCursor(editor.GetPos(Atoi(q) - 1, 0));
|
||||
AddHistory();
|
||||
return true;
|
||||
}
|
||||
q++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
s++;
|
||||
}
|
||||
|
||||
Vector<String> files = FindXFiles(3);
|
||||
|
||||
int n = 0;
|
||||
|
|
@ -152,8 +179,6 @@ bool Ide::FindLOG()
|
|||
}
|
||||
}
|
||||
|
||||
String ln = editor.GetUtf8Line(editor.GetCursorLine());
|
||||
|
||||
LogLine bestl;
|
||||
int best = -1;
|
||||
int bestp = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue