summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dochdl/gloshdl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/dochdl/gloshdl.cxx')
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index 85964f4c1f0c..e2585ff6cc03 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -374,8 +374,9 @@ bool SwGlossaryHdl::ExpandGlossary()
pWrtShell->LeaveBlockMode();
else if(pWrtShell->IsExtMode())
pWrtShell->LeaveExtMode();
- // select word
- pWrtShell->SelNearestWrd();
+ // select word (tdf#126589: part to the left of cursor)
+ if (pWrtShell->IsInWord() || pWrtShell->IsEndWrd())
+ pWrtShell->PrvWrd(true);
// ask for word
if(pWrtShell->IsSelection())
aShortName = pWrtShell->GetSelText();