sw/source/uibase/shells/textsh1.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit a1d39b2ea097e30a4e6ea4bfb37427c712e68fe2 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Tue Jul 14 14:18:36 2020 +0300 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Wed Jul 15 10:00:22 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_l...@sil.org> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit cef5a2d780ad01105dae860f6293f6f137603027) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98649 (cherry picked from commit 8901f44746f3df147d327e95125cbd4a08049843) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98762 diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 9f7dee3aeb2b..9ed8ec10c807 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -389,7 +389,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 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits