- Fix: Can't goto definition/declaration into files that not saved.
This commit is contained in:
parent
e794f9785c
commit
f0c01e03aa
1
NEWS.md
1
NEWS.md
|
@ -42,6 +42,7 @@ Red Panda C++ Version 2.26
|
|||
- Enhancement: add qmake variable to control preference of UTF-8 compatible OpenConsole.exe on Windows.
|
||||
- Enhancement: add Windows arm64 package.
|
||||
- Fix: Force to use debug server when debugging with lldb-mi to fix input/output on Windows.
|
||||
- Fix: Can't goto definition/declaration into files that not saved.
|
||||
|
||||
Red Panda C++ Version 2.25
|
||||
|
||||
|
|
|
@ -1373,7 +1373,6 @@ void Editor::mouseReleaseEvent(QMouseEvent *event)
|
|||
QString filename = mParser->getHeaderFileName(mFilename,s);
|
||||
pMainWindow->openFile(filename);
|
||||
return;
|
||||
|
||||
} else if (mParser->enabled()) {
|
||||
gotoDefinition(p);
|
||||
return;
|
||||
|
@ -4674,7 +4673,9 @@ void Editor::gotoDefinition(const QSynedit::BufferCoord &pos)
|
|||
filename = statement->definitionFileName;
|
||||
line = statement->definitionLine;
|
||||
}
|
||||
Editor *e = pMainWindow->openFile(filename);
|
||||
Editor *e = pMainWindow->editorList()->getOpenedEditorByFilename(filename);
|
||||
if (!e)
|
||||
e = pMainWindow->openFile(filename);
|
||||
if (e) {
|
||||
e->setCaretPositionAndActivate(line,1);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class CppSyntaxer: public Syntaxer
|
|||
rsDocstring,
|
||||
rsStringEscapeSeq,
|
||||
rsRawString, rsSpace,rsRawStringNotEscaping,rsRawStringEnd,rsChar,
|
||||
rsDefineIdentifier, rsDefineRemaining
|
||||
rsDefineIdentifier, rsDefineRemaining,
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue