[Libreoffice-commits] core.git: sw/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 14 13:38:54 UTC 2020
sw/source/uibase/shells/textsh1.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit cef5a2d780ad01105dae860f6293f6f137603027
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Tue Jul 14 14:18:36 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Jul 14 15:38:08 2020 +0200
tdf#134654 sw: Alt-X - end keyboard selection too
The selection itself was cancelled, but not the fact that
a keyboard selection was "in progress".
EndSelect is slightly heavy, so wrap it in a
very lightweight if statement.
ClearMark also checks HasMark, so real purpose
in first checking it.
Change-Id: I969a694c46d92201f3c3f2121e3fa3a2af27253c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98719
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 6a5cd8b3f42a..228a8a4b9210 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -365,7 +365,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
aRewriter.AddRule( UndoArg3, sReplacement );
rWrtSh.StartUndo(SwUndoId::REPLACE, &aRewriter);
rWrtSh.GetCursor()->Normalize(false);
+
rWrtSh.ClearMark();
+ if( rWrtSh.IsInSelect() ) // cancel any in-progress keyboard selection as well
+ rWrtSh.EndSelect();
+
for( sal_uInt32 i=aToggle.CharsToDelete(); i > 0; --i )
rWrtSh.DelLeft();
rWrtSh.Insert2( sReplacement );
More information about the Libreoffice-commits
mailing list