basctl/source/basicide/baside2.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
New commits: commit d75781dcd619a747b17b6c897ba44dc6ff8b5c7e Author: Andreas Heinisch <andreas.heini...@yahoo.de> AuthorDate: Wed Feb 12 22:48:45 2020 +0100 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Feb 13 07:20:20 2020 +0100 tdf#57307 - Expand word boundaries to include connector punctuations Include connector punctuations when adding a variable to the watch window using "Enable Watch (F7)" in order to add the correct variable name. Change-Id: Idaf7699dde3f4147d603c6aea4b2381e2af497a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88575 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 5d3bb561b275..85db57dfbfdd 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -695,14 +695,11 @@ void ModulWindow::BasicAddWatch() bool bAdd = true; if ( !GetEditView()->HasSelection() ) { - TextPaM aWordStart; - OUString aWord = GetEditEngine()->GetWord( GetEditView()->GetSelection().GetEnd(), &aWordStart ); + // tdf#57307 - expand selection to include connector punctuations + TextSelection aSel; + OUString aWord = GetEditEngine()->GetWord( GetEditView()->GetSelection().GetEnd(), &aSel.GetStart(), &aSel.GetEnd() ); if ( !aWord.isEmpty() ) - { - TextSelection aSel( aWordStart ); - aSel.GetEnd().GetIndex() += aWord.getLength(); GetEditView()->SetSelection( aSel ); - } else bAdd = false; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits