summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-01-16 20:13:54 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-01-16 20:13:54 (GMT)
commit09f7781c81fdf230a784fa3c74d7898a894f3c94 (patch)
treeec0a2bfaed48c972d4eb52f529ce2b7271531e08
parent20d035df8daad6946c62976f7c92c2e3e4109c67 (diff)
downloadtk-09f7781c81fdf230a784fa3c74d7898a894f3c94.zip
tk-09f7781c81fdf230a784fa3c74d7898a894f3c94.tar.gz
tk-09f7781c81fdf230a784fa3c74d7898a894f3c94.tar.bz2
Avoid confusion: the <<Selection>> event is documented to fire when the selection in the widget is changed. The previous commit message (and content) confused text widget selection and PRIMARY (X) selection. <<Selection>> shall fire whenever the text widget selection is changed, independently of whether the widget exports its selection or not, i.e. whether the PRIMARY selection is impacted or not.
-rw-r--r--tests/text.test12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/text.test b/tests/text.test
index 9e8ed9b..e330a61 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6408,8 +6408,8 @@ test text-27.15 {<<Selection>> virtual event on sel tagging} -body {
destroy .t
} -result {selection_changed}
test text-27.15a {<<Selection>> virtual event on <<PasteSelection>>} -body {
- pack [text .t -exportselection 1]
- .t insert end "There is a PRIMARY selection in this text widget, "
+ pack [text .t]
+ .t insert end "There is a selection in this text widget, "
.t insert end "and it will be impacted by the <<PasteSelection>> event received.\n"
.t insert end "Therefore a <<Selection>> event must fire back."
.t tag add sel 1.0 1.28
@@ -6423,8 +6423,8 @@ test text-27.15a {<<Selection>> virtual event on <<PasteSelection>>} -body {
destroy .t
} -result {<<Selection>>_fired}
test text-27.15b {<<Selection>> virtual event on <Delete>} -body {
- pack [text .t -exportselection 1]
- .t insert end "There is a PRIMARY selection in this text widget, "
+ pack [text .t]
+ .t insert end "There is a selection in this text widget, "
.t insert end "and it will be impacted by the <Delete> event received.\n"
.t insert end "Therefore a <<Selection>> event must fire back."
.t tag add sel 1.0 1.28
@@ -6440,8 +6440,8 @@ test text-27.15b {<<Selection>> virtual event on <Delete>} -body {
destroy .t
} -result {<<Selection>>_fired}
test text-27.15c {<<Selection>> virtual event on <<Cut>>} -body {
- pack [text .t -exportselection 1]
- .t insert end "There is a PRIMARY selection in this text widget, "
+ pack [text .t]
+ .t insert end "There is a selection in this text widget, "
.t insert end "and it will be impacted by the <<Cut>> event received.\n"
.t insert end "Therefore a <<Selection>> event must fire back."
.t tag add sel 1.0 1.28