ide: Fixed bug when clicking on Usage result in .lay while being in designer

This commit is contained in:
Mirek Fidler 2023-10-03 11:35:06 +02:00
parent eb4ed035e2
commit cbbf7d6324
4 changed files with 4155 additions and 4090 deletions

View file

@ -259,6 +259,8 @@ void Ide::GoToError(const ListLineInfo& f, bool error)
return;
String file = NormalizePath(f.file);
DoEditAsText(file);
if(designer)
FlushFile();
EditFile(file);
int lp = max(f.linepos - 1, 0);
int l = f.lineno - 1;
@ -267,7 +269,7 @@ void Ide::GoToError(const ListLineInfo& f, bool error)
l = editor.GetLineNo(l);
else {
String ln = TrimLeft(f.line);
if(ln.GetCount())
if(ln.GetCount() && l >= 0 && l < editor.GetLineCount())
for(int i = 0; i < 200; i++) {
if(l - i >= 0 && TrimLeft(editor.GetUtf8Line(l - i)) == ln) {
l = l - i;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -104,6 +104,14 @@ file
Debug.cpp,
Valgrind.cpp,
Export.cpp,
Repo readonly separator,
urepo.h,
RepoConsole.cpp readonly,
RepoSync.cpp,
Credentials.cpp,
Diff.cpp,
DirRepoDiff.cpp,
urepo.lay,
Resources readonly separator,
ide.lay,
ide.iml,
@ -113,14 +121,6 @@ file
depends() xide.ico
depends() ide.ico,
theide.desktop,
Repo readonly separator,
urepo.h,
RepoConsole.cpp readonly,
RepoSync.cpp,
Credentials.cpp,
Diff.cpp,
DirRepoDiff.cpp,
urepo.lay,
Info readonly separator,
Copying;