-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-130693: Add options of the tkinter.Text.search method: -nolinestop -all -overlap -strictlimits #130848
base: main
Are you sure you want to change the base?
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
================ | ||
Type: Enhancement | ||
Title: Add support for ``-nolinestop``, ``-all``, ``-overlap``, and ``-strictlimits`` options to ``tkinter.Text.search`` | ||
Issue: :gh:`130693` | ||
|
||
Detailed changes: | ||
- Enhanced the ``tkinter.Text.search`` method by adding support for the following options: | ||
- ``-nolinestop``: Allows searching across lines without stopping. | ||
- ``-all``: Finds all matches instead of just the first match. | ||
- ``-overlap``: Finds matches that overlap with each other. | ||
- ``-strictlimits``: Ensures strict boundaries for the search. | ||
|
||
These improvements align the ``tkinter.Text.search`` method with the underlying Tcl/Tk library, providing more flexibility and functionality for users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete the first few lines and summarize them in only a few sentences
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Add options -nolinestop, -all, -overlap, and -strictlimits to the search function of the text class of tkinter.
Fixes #130693
Closes #130693
Tested against
And test passed. Result:
Also tested against a custom test file:
Which returns:
Indicating that the new features are functioning correctly