diff --git a/twander.py b/twander.py index 5da54e7..30b335a 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.134 2003/03/11 17:46:04 tundra Exp $" +RCSID = "$Id: twander.py,v 3.135 2003/03/12 00:03:07 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -3793,7 +3793,18 @@ else: currentdir = UI.CurrentDir + cmd = cmd.replace(DIR, QUOTECHAR + StripPSEP(currentdir) + QUOTECHAR) + selection = StripPSEP(UI.LastInSelection()) + dselection = "" + + if selection: + dselection = QUOTECHAR + currentdir + selection + QUOTECHAR + selection = QUOTECHAR + selection + QUOTECHAR + + cmd = cmd.replace(SELECTION, selection) + cmd = cmd.replace(DSELECTION, dselection) + selections = "" dselections = "" for selected in UI.AllSelection(): @@ -3803,13 +3814,10 @@ dselections += QUOTECHAR + currentdir + selected + QUOTECHAR + " " selections += QUOTECHAR + selected + QUOTECHAR + " " - cmd = cmd.replace(DIR, QUOTECHAR + StripPSEP(currentdir) + QUOTECHAR) - cmd = cmd.replace(DSELECTION, QUOTECHAR + currentdir + selection + QUOTECHAR) + cmd = cmd.replace(SELECTIONS, selections) cmd = cmd.replace(DSELECTIONS, dselections) cmd = cmd.replace(HASH, COMMENT) - cmd = cmd.replace(SELECTION, QUOTECHAR + selection + QUOTECHAR) - cmd = cmd.replace(SELECTIONS, selections) - + # Process references to program memories for x in range(NUMPROGMEM):