From e4c28ef3bff80f296ff62e7500d463e720ef5873 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sun, 12 May 2024 15:54:40 -0400 Subject: [PATCH] Corrected an issue introduced in version 8.3.471 when trying to fix some of the "select" command syntax; the code change caused the "select top cell" command to behave the same as "select cell". There was no specific code for handling "top", so now there is. --- VERSION | 2 +- commands/CmdRS.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 80e6d372..ad84a18e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.481 +8.3.482 diff --git a/commands/CmdRS.c b/commands/CmdRS.c index ede984d5..bda7d9c9 100644 --- a/commands/CmdRS.c +++ b/commands/CmdRS.c @@ -855,7 +855,7 @@ CmdSelect(w, cmd) bool layerspec; bool degenerate; bool doat = FALSE; - bool more = FALSE, less = FALSE, samePlace = TRUE; + bool more = FALSE, less = FALSE, samePlace = TRUE, dotop = FALSE; unsigned char labelpolicy = SEL_DO_LABELS; #ifdef MAGIC_WRAPPER char *tclstr; @@ -942,6 +942,7 @@ CmdSelect(w, cmd) "cell", strlen(cmd->tx_argv[2]))) { isqual = 1; + dotop = TRUE; optionArgs = &cmd->tx_argv[2]; } } @@ -1614,9 +1615,10 @@ CmdSelect(w, cmd) use = DBSelectCell(scx.scx_use, lastUse, &lastIndices, &scx.scx_area, crec->dbw_bitmask, &trans, &p, &tpath); - /* Use the window's root cell if nothing else is found. */ + /* Use the window's root cell if nothing else is found, */ + /* or if the command was "select top cell". */ - if (use == NULL) + if ((dotop == TRUE) || (use == NULL)) { use = lastUse = scx.scx_use; p.p_x = scx.scx_use->cu_xlo;