[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-11-30 Thread pyTama


Change by pyTama :


--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-10-01 Thread pyTama


pyTama  added the comment:

I'm running on windows. The patch level on python 3.6 is (8, 6, 6, 'final', 0), 
while on python 3.5 is (8, 6, 4, 'final', 0).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-10-01 Thread E. Paine


E. Paine  added the comment:

Thank you for reporting this issue, however it is ultimately a Tk issue as 
shown by running the attached script in wish. I assume the Tk version was 
updated in Python 3.6, though I don't know which platform you are on so don't 
know which of Ned or Steve to nosy to verify this theory (you can check 
yourself by calling `tkinter.test.support.get_tk_patchlevel()` in both 3.5 & 
3.6).

I am currently in the process of digging through the Tk source looking for the 
cause of the problem (so I can decide whether to report it to the Tk team - you 
can do so yourself if you prefer). This issue should be closed as third party, 
but I will link the Tk issue here if I decide to create one.

--
Added file: https://bugs.python.org/file49481/wordstart with tag.tcl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-10-01 Thread E. Paine


Change by E. Paine :


--
nosy: +epaine

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-09-30 Thread Tama-kun


New submission from Tama-kun :

This issue occurs when using the current mouse position from an event and the 
wordstart expression to find the index of the start of a clicked word on a text 
widget and the indices for the clicked word are tagged. If there's a single 
non-alphanumberic and underline character between the clicked word and the left 
edge of the text widget the index return for the start of the word will be the 
one for said non-alphanumeric and underline character. 

test.index(('@%s,%s wordstart' % (event.x, event.y)))

Assuming "[testing]" is at the indices 1.0 to 1.9 of a text widget, clicking on 
testing will return 1.1. If we tag the indices 1.1 to 1.8 with 
test.tag_add("tag", 1.1, 1.8) then clicking on the word testing will return 
1.0. This change of return doesn't occur if "[testing]" does not begin at a x.0 
index or if there's multiple non-alphanumeric and underline characters such as 
"[[testing]". Using wordend will return 1.8 in both tagged and non tagged 
scenarios.

The attached script illustrates this bug, only the middle text widget will 
print out the unexpected start index when clicking on the word testing. This 
issue isn't present when using python 3.5, running the script on python 3.5 
will print out all expected indices.

--
components: Tkinter
files: test.py
messages: 377716
nosy: Tama-kun, gpolo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Moving index with wordstart expression includes non-alphanumberic and 
underline characters if word is tagged and iat the edge of a text widget
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49479/test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com