Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Commit 2dbb6ac

Browse files
committed
[[ Bug 10986 ]] Make sure we only select an object if 'before/after' is not specified.
1 parent 4d5eece commit 2dbb6ac

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/notes/bugfix-10986.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 'select before/after field ...' selects the field object, rather than the text in the field.

engine/src/chunk.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2611,7 +2611,9 @@ Exec_stat MCChunk::select(MCExecPoint &ep, Preposition_type where, Boolean text,
26112611
}
26122612
// MW-2013-06-20: [[ Bug 10966 ]] Use 'istextchunk()' to determine whether
26132613
// the chunk can be evaluated as an object.
2614-
if (!text && !istextchunk())
2614+
// MW-2013-06-26: [[ Bug 10986 ]] Make sure we only select the object if we aren't
2615+
// doing select before/after.
2616+
if (!text && where == PT_AT && !istextchunk())
26152617
{
26162618
if (first)
26172619
MCselected->clear(False);

0 commit comments

Comments
 (0)