Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-8-27-25'

This commit is contained in:
Ryan Kurtz 2025-08-28 05:32:29 -04:00
commit 3a243ed964
2 changed files with 7 additions and 3 deletions

View file

@ -31,6 +31,7 @@ import ghidra.app.cmd.disassemble.DisassembleCommand;
import ghidra.app.plugin.core.bookmark.BookmarkEditCmd; import ghidra.app.plugin.core.bookmark.BookmarkEditCmd;
import ghidra.app.plugin.core.codebrowser.CodeBrowserPlugin; import ghidra.app.plugin.core.codebrowser.CodeBrowserPlugin;
import ghidra.app.services.GoToService; import ghidra.app.services.GoToService;
import ghidra.app.util.viewer.field.AddressFieldFactory;
import ghidra.app.util.viewer.field.FunctionSignatureFieldFactory; import ghidra.app.util.viewer.field.FunctionSignatureFieldFactory;
import ghidra.framework.cmd.CompoundCmd; import ghidra.framework.cmd.CompoundCmd;
import ghidra.framework.plugintool.PluginTool; import ghidra.framework.plugintool.PluginTool;
@ -159,6 +160,9 @@ public class NextPrevCodeUnitPluginTest extends AbstractGhidraHeadedIntegrationT
@Test @Test
public void testSearchInstruction() throws Exception { public void testSearchInstruction() throws Exception {
// Note: if we don't start on the address field, then the first call to nextInstruction()
// will go to the address field.
cb.goToField(addr("0x1001000"), AddressFieldFactory.FIELD_NAME, 0, 0);
assertAddress("0x1001000"); assertAddress("0x1001000");
nextInstruction(); nextInstruction();
assertAddress("0x1002239"); assertAddress("0x1002239");

View file

@ -102,7 +102,7 @@ public class DecompilerPanel extends JPanel implements FieldMouseListener, Field
private Color originalBackgroundColor; private Color originalBackgroundColor;
private boolean useNonFunctionColor = false; private boolean useNonFunctionColor = false;
private boolean navitationEnabled = true; private boolean navigationEnabled = true;
private DecompilerHoverProvider decompilerHoverProvider; private DecompilerHoverProvider decompilerHoverProvider;
@ -760,7 +760,7 @@ public class DecompilerPanel extends JPanel implements FieldMouseListener, Field
* @param enabled false disabled mouse function navigation * @param enabled false disabled mouse function navigation
*/ */
void setMouseNavigationEnabled(boolean enabled) { void setMouseNavigationEnabled(boolean enabled) {
navitationEnabled = enabled; navigationEnabled = enabled;
} }
@Override @Override
@ -791,7 +791,7 @@ public class DecompilerPanel extends JPanel implements FieldMouseListener, Field
private void tryToGoto(FieldLocation location, Field field, MouseEvent event, private void tryToGoto(FieldLocation location, Field field, MouseEvent event,
boolean newWindow) { boolean newWindow) {
if (!navitationEnabled) { if (!navigationEnabled) {
return; return;
} }