summaryrefslogtreecommitdiff
path: root/Lib/idlelib/editor.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-27115: Use Query subclass for IDLE editor Goto (GH-18871)Terry Jan Reedy2020-03-091-12/+10
| | | | Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog. The new box checks for positivity before returning.
* bpo-39885: IDLE context menu clears selection (#18859)Terry Jan Reedy2020-03-081-0/+1
| | | | | Since clicking to get an IDLE context menu moves the cursor, any text selection should be and now is cleared.
* bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801)Terry Jan Reedy2020-03-081-1/+4
| | | | | | It appears standard that moving the text insert cursor away from a selection clears the selection. Clearing prevents accidental deletion of a possibly off-screen bit of text. The update is for Ln and Col on the status bar.
* bpo-38792: Remove IDLE shell calltip before new prompt. (#17150)Zackery Spytz2020-01-301-1/+1
| | | | | | | Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tal Einat <taleinat+github@gmail.com>
* bpo-32989: IDLE - fix bad editor call of pyparse method (GH-5968)Cheryl Sabella2020-01-211-21/+34
| | | | | | | | Fix comments and add tests for editor newline_and_indent_event method. Remove unused None default for function parameter of pyparse find_good_parse_start method and code triggered by that default. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-38636: Fix IDLE tab toggle and file indent width (GH-17008)Terry Jan Reedy2019-11-201-2/+3
| | | | | These Format menu functions (default shortcuts Alt-T and Alt-U) were mistakenly disabled in 3.7.5 and 3.8.0.
* bpo-4630: Add cursor no-blink option for IDLE (GH-16960)Zackery Spytz2019-11-131-0/+16
| | | This immediately toggles shell, editor, and output windows, but does not affect other input widgets.
* bpo-13153: Use OS native encoding for converting between Python and Tcl. ↵Serhiy Storchaka2019-10-041-26/+3
| | | | | | | | | | | | | (GH-16545) On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the "surrogatepass" error handler for converting to/from Tcl Unicode objects. On Linux use UTF-8 with the "surrogateescape" error handler for converting to/from Tcl String objects. Converting strings from Tcl to Python and back now never fails (except MemoryError).
* bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212)Terry Jan Reedy2019-09-171-4/+7
| | | | | One happens when EditorWindow.close is called twice. Printing a traceback, when IDLE is run from a terminal, is useless and annoying.
* bpo-38183: Test_idle ignores user config directory GH-16198)Terry Jan Reedy2019-09-161-16/+18
| | | | | It no longer tries to create or access .idlerc or any files within. Users must run IDLE to discover problems with saving settings.
* bpo-37902: IDLE: Add scrolling for IDLE browsers. (#15368)GeeTransit2019-09-041-20/+5
| | | | Modify the wheel event handler so it can also be used for module, path, and stack browsers. Patch by George Zhang.
* bpo-37929: IDLE: avoid Squeezer-related config dialog crashes (GH-15452)Tal Einat2019-08-251-3/+22
| | | | | | | | | These were caused by keeping around a reference to the Squeezer instance and calling it's load_font() upon config changes, which sometimes happened even if the shell window no longer existed. This change completely removes that mechanism, instead having the editor window properly update its width attribute, which can then be used by Squeezer.
* bpo-29446: IDLE -- add explicit imports (GH-14919)Terry Jan Reedy2019-07-231-0/+2
| | | Stop depending on tkinter import *.
* bpo-17535: IDLE editor line numbers (GH-14030)Tal Einat2019-07-231-13/+49
|
* bpo-36390: Gather IDLE Format menu functions into format.py (#14827)Terry Jan Reedy2019-07-171-30/+4
| | | | | | Add two indent spec methods from editor and Rstrip to existing file. Tests are not added for indent methods because they need change in lights of 3.x's prohibition on mixing tabs and spaces.
* bpo-36390: IDLE: Combine region formatting methods. (GH-12481)Cheryl Sabella2019-07-171-111/+10
| | | | | Rename paragraph.py to format.py and add region formatting methods from editor.py. Add tests for the latter.
* bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)Tal Einat2019-07-171-3/+16
| | | | | | | | | | | * Only create CodeContext instances for "real" editors windows, but not e.g. shell or output windows. * Remove configuration update Tk event fired every second, by having the editor window ask its code context widget to update when necessary, i.e. upon font or highlighting updates. * When code context isn't being shown, avoid having a Tk event fired every 100ms to check whether the code context needs to be updated. * Use the editor window's getlineno() method where applicable. * Update font of the code context widget before the main text widget
* bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500)Tal Einat2019-07-111-23/+16
|
* bpo-5680: IDLE: Customize running a module (GH-13763)Cheryl Sabella2019-06-171-0/+1
| | | The initialize options are 1) add command line options, which are appended to sys.argv as if passed on a real command line, and 2) skip the shell restart. The customization dialog is accessed by a new entry on the Run menu.
* IDLE: Fix typos in docs and comments (GH-13749)Xtreak2019-06-031-1/+1
|
* bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307)Cheryl Sabella2019-06-021-6/+1
| | | | Changes in bpo- 31858 made the less informative 'context_use_ps1' redundant.
* bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)Cheryl Sabella2019-03-011-1/+1
| | | | Remove colorizer.ColorDelegator.close_when_done and the corresponding argument of .close(). In IDLE, both have always been None or False since 2007.
* bpo-35769: Change IDLE's name for new files from 'Untitled' to 'untitled' ↵Terry Jan Reedy2019-01-181-2/+2
| | | | | (GH-11602) 'Untitled' violates the PEP 8 standard for .py files
* bpo-35196: Optimize Squeezer's write() interception (GH-10454)Tal Einat2019-01-131-3/+0
| | | | The new functionality of Squeezer.reload() is also tested, along with some general re-working of the tests in test_squeezer.py.
* IDLE: Create function to update menu item state. (GH-11343)Cheryl Sabella2018-12-281-1/+6
| | | | This will be needed for other menu items. Change outwin to call the function instead of updating the menu item directly.
* bpo-22703: IDLE: Improve Code Context and Zoom Height menu labels (GH-11214)Cheryl Sabella2018-12-211-0/+5
| | | | | | | | The Code Context menu label now toggles between Show/Hide Code Context. The Zoom Height menu now toggles between Zoom/Restore Height. Zoom Height has moved from the Window menu to the Options menu. https://bugs.python.org/issue22703
* bpo-1529353: IDLE: squeeze large output in the shell (GH-7626)Tal Einat2018-09-251-3/+4
|
* bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678)Tal Einat2018-08-101-6/+17
|
* bpo-33924: Change IDLE mainmenu.menudefs key 'windows' to 'window' (GH-7836)Terry Jan Reedy2018-06-201-3/+3
| | | | | Every other menudef key is the lowercase version of the corresponding main menu entry (in this case, 'Window').
* bpo-33906: Rename idlelib.windows as window (#7833)Terry Jan Reedy2018-06-201-7/+7
| | | | Match Window on the main menu and remove last plural module name. Change imports, test, and attribute references to match new name.
* bpo-33904: In IDLE's rstrip, rename class RstripExtension as Rstrip (GH-7811)Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)2018-06-201-2/+2
|
* bpo-33907: Rename an IDLE module and class. (GH-7807)Terry Jan Reedy2018-06-191-6/+6
| | | | Improve consistency and appearance. Module idlelib.calltips is now calltip. Class idlelib.calltip_w.CallTip is now Calltip.
* bpo-33855: Minimally test all IDLE modules. (GH-7689)Terry Jan Reedy2018-06-151-2/+2
| | | | Create a template for minimally testing a tkinter-using module by importing it and instantiating its class(es). Add a test file for all non-startup IDLE modules. Edit existing files and update coverage. This is part 1 of 3, covering the 21 autocomplete to help modules and touching 33 idlelib files.
* bpo-33664: Scroll IDLE editor text by lines (GH-7351)Cheryl Sabella2018-06-041-2/+27
| | | | | | Previously, the mouse wheel and scrollbar slider moved text by a fixed number of pixels, resulting in partial lines at the top of the editor box. The change also applies to the shell and grep output windows, but not to read-only text views.
* bpo-21474: Update IDLE word/identifier definition from ascii to unicode. ↵Terry Jan Reedy2018-04-301-4/+4
| | | | | | | (GH-6643) In text and entry boxes, this affects selection by double-click, movement left/right by control-left/right, and deletion left/right by control-BACKSPACE/DEL.
* bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830)Cheryl Sabella2018-02-231-2/+2
| | | Adjust tests and user modules to match.
* bpo-32100: IDLE: Fix pathbrowser errors; improve tests. (#4484)Cheryl Sabella2017-11-221-1/+1
| | | Patch mostly by Cheryl Sabella
* IDLE -- Restrict shell prompt manipulaton to the shell. (#4143)Terry Jan Reedy2017-10-271-11/+4
| | | | | | Editor and output windows only see an empty last prompt line. This simplifies the code and fixes a minor bug when newline is inserted. Sys.ps1, if present, is read on Shell start-up, but is not set or changed.
* bpo-31460: Simplify the API of IDLE's Module Browser. (#3842)Terry Jan Reedy2017-09-301-3/+1
| | | | | | Passing a widget instead of an flist with a root widget opens the option of creating a browser frame that is only part of a window. Passing a full file name instead of pieces assumed to come from a .py file opens the possibility of browsing python files that do not end in .py.
* bpo-31459: Rename IDLE's module browser from Class Browser to Module ↵Cheryl Sabella2017-09-231-5/+5
| | | | | | | | | | | Browser. (#3704) The original module-level class and method browser became a module browser, with the addition of module-level functions, years ago. Nested classes and functions were added yesterday. For back- compatibility, the virtual event <<open-class-browser>>, which appears on the Keys tab of the Settings dialog, is not changed. Patch by Cheryl Sabella.
* bpo-27099: IDLE - Convert built-in extensions to regular features (#2494)wohlganger2017-09-101-12/+52
| | | | | | | | | | | | | | | | | | | | | About 10 IDLE features were implemented as supposedly optional extensions. Their different behavior could be confusing or worse for users and not good for maintenance. Hence the conversion. The main difference for users is that user configurable key bindings for builtin features are now handled uniformly. Now, editing a binding in a keyset only affects its value in the keyset. All bindings are defined together in the system-specific default keysets in config- extensions.def. All custom keysets are saved as a whole in config- extension.cfg. All take effect as soon as one clicks Apply or Ok. The affected events are '<<force-open-completions>>', '<<expand-word>>', '<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>', '<<run-module>>', '<<check-module>>', and '<<zoom-height>>'. Any (global) customizations made before 3.6.3 will not affect their keyset- specific customization after 3.6.3. and vice versa. Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
* bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629)terryjreedy2017-07-071-2/+2
|
* bpo-29910: IDLE no longer deletes a character after commenting out a region ↵Serhiy Storchaka2017-06-271-6/+24
| | | | | | | | | | | (#825) This happened because shortcut has a class binding and 'break' was not returned. Fix other potential conflicts between IDLE and default key bindings. * Add news item * Update NEWS
* bpo-24813: IDLE: Add default title to help_about (#2366)csabella2017-06-231-1/+1
| | | Patch by Cheryl Sabella.
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+0
| | | Make also minor PEP8 coding style fixes on modified imports.
* Issue #27891: Consistently group and sort imports within idlelib modules.Terry Jan Reedy2016-08-311-20/+21
|
* Issue 27437: Add query.ModuleName and use it for file => Load Module.Terry Jan Reedy2016-07-031-38/+20
| | | | Users can now edit bad entries instead of starting over.
* Issue 27372: Stop test_idle from changing locale, so test passes.Terry Jan Reedy2016-06-261-2/+6
| | | | In 3.6, the warning is now called an error, making it harder to ignore.
* Issue *24750: Switch all scrollbars in IDLE to ttk versions.Terry Jan Reedy2016-06-101-0/+1
| | | | Where needed, add minimal tests to cover changes.
* Issue #24759: IDLE requires tk 8.5 and availability ttk widgets.Terry Jan Reedy2016-06-091-7/+4
| | | | Delete now unneeded tk version tests and code for older versions.