rp 0.1.1359__tar.gz → 0.1.1360__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rp-0.1.1359 → rp-0.1.1360}/PKG-INFO +1 -1
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/buffer.py +20 -8
- rp-0.1.1360/rp/rp_ptpython/ast_selection.py +85 -0
- rp-0.1.1360/rp/rp_ptpython/bash_selection.py +198 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/completer.py +1 -3
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/key_bindings.py +917 -144
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/layout.py +257 -2
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/python_input.py +9 -0
- rp-0.1.1360/rp/rp_ptpython/refactor_extract.py +690 -0
- rp-0.1.1360/rp/rp_ptpython/refactor_inline.py +699 -0
- rp-0.1.1360/rp/rp_ptpython/refactor_move.py +512 -0
- rp-0.1.1360/rp/rp_ptpython/refactor_move_bash.py +210 -0
- rp-0.1.1360/rp/rp_ptpython/refactor_rename.py +947 -0
- rp-0.1.1360/rp/rp_ptpython/selection_utils.py +198 -0
- rp-0.1.1360/rp/rp_ptpython/treesitter_selection.py +196 -0
- rp-0.1.1360/rp/version.py +1 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp.egg-info/PKG-INFO +1 -1
- {rp-0.1.1359 → rp-0.1.1360}/rp.egg-info/SOURCES.txt +8 -0
- rp-0.1.1360/version.py +1 -0
- rp-0.1.1359/rp/rp_ptpython/ast_selection.py +0 -429
- rp-0.1.1359/rp/version.py +0 -1
- rp-0.1.1359/version.py +0 -1
- {rp-0.1.1359 → rp-0.1.1360}/.gitignore +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.idea/QuickPython.iml +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.idea/QuickPython.time +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.idea/encodings.xml +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.idea/inspectionProfiles/Project_Default.xml +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.idea/misc.xml +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.idea/modules.xml +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.idea/vcs.xml +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.idea/workspace.xml +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.publish.sh.un~ +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.setup.py.un~ +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/.update_module_paths.py.un~ +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/LICENSE.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/README +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/Scrap +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/aoisdasd +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/increment_version.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/oijio +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/publish.sh +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/pyqtconsoletest.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/__main__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/documentation.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/Pyperclip.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/debug_comment.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/draw_code_minimap.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/graveyard.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/_compatibility.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/cache.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/file_io.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/grammar.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/normalizer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/parser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/pgen2/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/pgen2/generator.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/pgen2/grammar_parser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/diff.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/errors.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar26.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar27.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar310.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar311.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar312.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar33.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar34.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar35.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar36.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar37.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar38.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/grammar39.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/parser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/pep8.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/prefix.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/token.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/tokenize.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/python/tree.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/tree.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/parso/utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/peepdis/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/peepdis/core.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/peepdis/datastructures.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/peepdis/legacy.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/peepdis/preferences.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/powerpoint_converter.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/profile_vim_plugins.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/bindings/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/bindings/flann_ctypes.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/exceptions.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/index.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/io/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/io/binary_dataset.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/io/dat_dataset.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/io/dataset.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/io/hdf5_dataset.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/io/npy_dataset.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/util/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyflann/util/weave_tools.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/__version__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/app.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/cli.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/cli_utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/config/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/config/config.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/config/config_error.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/config/config_parser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/config/config_transformer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/config/validators/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/config/validators/options.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/logging.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/autocomplete/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/autocomplete/autocomplete_listener.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/common/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/common/jsonpath/JSONPathLexer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/common/jsonpath/JSONPathListener.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/common/jsonpath/JSONPathParser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/common/jsonpath/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/io/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/io/datasource.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/model/model.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/service/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/service/client.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/service/dispatcher.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/common/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/common/popup.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/common/selectable_text.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/autocomplete_popup/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/autocomplete_popup/autocomplete_popup.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/autocomplete_popup/autocomplete_popup_keymapper.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/help_bar/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/help_bar/help_bar.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/help_page/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/help_page/detailed_help_page.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/json_browser/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/json_browser/json_browser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/json_browser/json_browser_keymapper.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/query_bar/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/query_bar/query_bar.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/components/query_bar/query_bar_keymapper.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/array/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/array/array_end_node.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/array/array_end_widget.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/array/array_node.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/array/array_start_widget.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/array/array_unexpanded_widget.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/json_composite_end_node.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/json_composite_node.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/json_listbox.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/json_listwalker.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/json_simple_node.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/json_widget.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/node_factory.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/object/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/object/object_end_node.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/object/object_end_widget.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/object/object_node.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/object/object_start_widget.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/object/object_unexpanded_widget.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/primitive/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/primitive/base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/primitive/boolean.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/primitive/generic.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/primitive/integer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/primitive/null.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/primitive/numeric.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/primitive/string.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/json_lib/selector/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/keymapper/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/keymapper/abstract_component_keymapper.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/keymapper/keymapper.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/keymapper/keymapper_config.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/keymapper/keymapper_config_parser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/theme/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/theme/theme.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/theme/theme_config.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/theme/theme_config_parser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/view_config.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/view_frame.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pyfx/view/view_manager.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pynput_recorder.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pypi_inspection.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/pytorch_module_explorer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/refactor/string_format/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/refactor/string_format/format_to_fstring_converter.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/refactor/string_format/fstring_converter.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/refactor/string_format/test_format_to_fstring_converter.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/refactor/string_format/test_fstring_converter.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/rp_black_macchiato.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/stamp_tensor.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/stdin_python_highlighter.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/__main__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/graphics/graphics/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/graphics/graphics/canvas.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/graphics/graphics/colors.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/graphics/graphics/console.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/graphics/graphics/funcs.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/graphics/graphics/nbinput.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/graphics/graphics/shapes.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/graphics/graphics/sprite.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/letters.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tetris/tetrisShapes.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/__main__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/argparser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/meta.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/methods/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/methods/ansi.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/methods/ansi_methods.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/methods/ascii.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/methods/method.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/methods/sixel.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/timg/renderer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/torch_hooks.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/torch_tools.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tracetraptest.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/tweenline.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/libs/webeval_dataset.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/list_of_modules.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/blm.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/chainsaw.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/death_of_the_mind.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/flappy.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/mario.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/matrix.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/mpi_untitled.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/py2048.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/pychess.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/rp_mpi.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/ryan_zshrc.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/shotgun.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/skia_trail_interactive_paint_demo.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/snake.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/sudoku.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/tetris.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/misc/trans.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/application.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/auto_suggest.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/buffer_mapping.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/cache.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/clipboard/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/clipboard/base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/clipboard/in_memory.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/clipboard/pyperclip.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/completion.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/completers/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/completers/base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/completers/filesystem.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/completers/system.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/regular_languages/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/regular_languages/compiler.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/regular_languages/completion.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/regular_languages/lexer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/regular_languages/regex_parser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/regular_languages/validation.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/telnet/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/telnet/application.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/telnet/log.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/telnet/protocol.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/telnet/server.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/validators/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/contrib/validators/base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/document.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/enums.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/asyncio_base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/asyncio_posix.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/asyncio_win32.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/callbacks.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/inputhook.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/posix.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/posix_utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/select.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/eventloop/win32.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/filters/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/filters/base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/filters/cli.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/filters/types.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/filters/utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/history.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/input.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/interface.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/bindings/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/bindings/basic.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/bindings/completion.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/bindings/emacs.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/bindings/named_commands.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/bindings/scroll.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/bindings/vi.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/defaults.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/digraphs.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/input_processor.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/manager.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/registry.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/key_binding/vi_state.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/keys.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/containers.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/controls.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/dimension.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/lexers.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/margins.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/menus.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/mouse_handlers.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/processors.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/prompt.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/screen.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/toolbars.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/untitled.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/layout/utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/mouse_events.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/output.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/reactive.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/renderer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/search_state.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/selection.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/shortcuts.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/styles/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/styles/base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/styles/defaults.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/styles/from_dict.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/styles/from_pygments.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/styles/utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/terminal/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/terminal/conemu_output.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/terminal/vt100_input.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/terminal/vt100_output.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/terminal/win32_input.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/terminal/win32_output.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/token.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/validation.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/prompt_toolkit/win32_types.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/r.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/__main__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/async_analyzer_base.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/async_jedi_highlighter.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/bash_completer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/completer_old.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/completion_ranker.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/completion_schema.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/completion_types.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/eventloop.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/filters.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/history_browser.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/ipython.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/jedi_highlighter.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/jedi_lexer.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/jedi_utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/patch_linecache.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/path_completer_utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/prompt_style.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/r_iterm_comm.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/repl.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/__init__.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/commands.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/completers.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/completion_hints.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/grammar.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/key_bindings.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/layout.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/style.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/rp_ptpdb/toolbars.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/style.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/testable_keybindings.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/treesitter_semantic.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/unreachable_detector.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/utils.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/rp_ptpython/validator.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/ryan_vimrc.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp/web_evaluator.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp.egg-info/dependency_links.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp.egg-info/entry_points.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp.egg-info/requires.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/rp.egg-info/top_level.txt +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/setup.cfg +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/setup.py +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/untitled.c +0 -0
- {rp-0.1.1359 → rp-0.1.1360}/update_module_paths.py +0 -0
|
@@ -684,15 +684,16 @@ class Buffer(object):
|
|
|
684
684
|
|
|
685
685
|
def save_to_undo_stack(self, clear_redo_stack=False):
|
|
686
686
|
"""
|
|
687
|
-
Safe current state (input text
|
|
687
|
+
Safe current state (input text, cursor position, selection), so that we can
|
|
688
688
|
restore it by calling undo.
|
|
689
689
|
"""
|
|
690
690
|
# Safe if the text is different from the text at the top of the stack
|
|
691
|
-
# is different. If the text is the same, just update the cursor position.
|
|
691
|
+
# is different. If the text is the same, just update the cursor position and selection.
|
|
692
|
+
selection = self.selection_state # Use selection_state, not document.selection
|
|
692
693
|
if self._undo_stack and self._undo_stack[-1][0] == self.text:
|
|
693
|
-
self._undo_stack[-1] = (self._undo_stack[-1][0], self.cursor_position)
|
|
694
|
+
self._undo_stack[-1] = (self._undo_stack[-1][0], self.cursor_position, selection)
|
|
694
695
|
else:
|
|
695
|
-
self._undo_stack.append((self.text, self.cursor_position))
|
|
696
|
+
self._undo_stack.append((self.text, self.cursor_position, selection))
|
|
696
697
|
|
|
697
698
|
# Saving anything to the undo stack, clears the redo stack.
|
|
698
699
|
if clear_redo_stack:
|
|
@@ -1346,15 +1347,20 @@ class Buffer(object):
|
|
|
1346
1347
|
# cause that the top of the undo stack is usually the same as the
|
|
1347
1348
|
# current text, so in that case we have to pop twice.)
|
|
1348
1349
|
while self._undo_stack:
|
|
1349
|
-
|
|
1350
|
+
item = self._undo_stack.pop()
|
|
1351
|
+
# Handle both old (text, pos) and new (text, pos, selection) formats
|
|
1352
|
+
text, pos = item[0], item[1]
|
|
1353
|
+
selection = item[2] if len(item) > 2 else None
|
|
1350
1354
|
|
|
1351
1355
|
if text != self.text:
|
|
1352
1356
|
# Push current text to redo stack.
|
|
1353
1357
|
# ring_terminal_bell()
|
|
1354
|
-
self._redo_stack.append((self.text, self.cursor_position))
|
|
1358
|
+
self._redo_stack.append((self.text, self.cursor_position, self.selection_state))
|
|
1355
1359
|
# print(self._redo_stack)
|
|
1356
|
-
# Set new text/cursor_position
|
|
1360
|
+
# Set new text/cursor_position, then restore selection_state
|
|
1361
|
+
# (document setter triggers _text_changed which clears selection_state)
|
|
1357
1362
|
self.document = Document(text, cursor_position=pos)
|
|
1363
|
+
self.selection_state = selection
|
|
1358
1364
|
break
|
|
1359
1365
|
|
|
1360
1366
|
def redo(self):
|
|
@@ -1365,8 +1371,14 @@ class Buffer(object):
|
|
|
1365
1371
|
self.save_to_undo_stack(clear_redo_stack=False)
|
|
1366
1372
|
|
|
1367
1373
|
# Pop state from redo stack.
|
|
1368
|
-
|
|
1374
|
+
item = self._redo_stack.pop()
|
|
1375
|
+
# Handle both old (text, pos) and new (text, pos, selection) formats
|
|
1376
|
+
text, pos = item[0], item[1]
|
|
1377
|
+
selection = item[2] if len(item) > 2 else None
|
|
1378
|
+
# Set text/cursor first, then restore selection_state
|
|
1379
|
+
# (document setter triggers _text_changed which clears selection_state)
|
|
1369
1380
|
self.document = Document(text, cursor_position=pos)
|
|
1381
|
+
self.selection_state = selection
|
|
1370
1382
|
# else:
|
|
1371
1383
|
# text_to_speech("FAILED")
|
|
1372
1384
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AST-based smart selection for Python code.
|
|
3
|
+
|
|
4
|
+
Fallback for when tree-sitter is not available. Only works with valid syntax.
|
|
5
|
+
"""
|
|
6
|
+
from typing import List, Tuple, Optional, Set
|
|
7
|
+
import ast
|
|
8
|
+
|
|
9
|
+
from .selection_utils import (
|
|
10
|
+
get_word_spans,
|
|
11
|
+
get_string_content_spans,
|
|
12
|
+
get_bracket_spans,
|
|
13
|
+
get_line_spans,
|
|
14
|
+
get_indent_paragraph_spans,
|
|
15
|
+
get_comment_block_spans,
|
|
16
|
+
find_next_span,
|
|
17
|
+
contract,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def get_ast_spans(code: str) -> Set[Tuple[int, int]]:
|
|
22
|
+
"""Get spans from Python AST nodes."""
|
|
23
|
+
try:
|
|
24
|
+
tree = ast.parse(code)
|
|
25
|
+
except SyntaxError:
|
|
26
|
+
return set()
|
|
27
|
+
|
|
28
|
+
spans = set()
|
|
29
|
+
lines = code.split('\n')
|
|
30
|
+
|
|
31
|
+
def offset(lineno: int, col: int) -> int:
|
|
32
|
+
return sum(len(line) + 1 for line in lines[:lineno - 1]) + col
|
|
33
|
+
|
|
34
|
+
def visit(node):
|
|
35
|
+
if hasattr(node, 'lineno') and hasattr(node, 'col_offset'):
|
|
36
|
+
start = offset(node.lineno, node.col_offset)
|
|
37
|
+
if hasattr(node, 'end_lineno') and hasattr(node, 'end_col_offset'):
|
|
38
|
+
end = offset(node.end_lineno, node.end_col_offset)
|
|
39
|
+
else:
|
|
40
|
+
end = start + 1
|
|
41
|
+
spans.add((start, end))
|
|
42
|
+
for child in ast.iter_child_nodes(node):
|
|
43
|
+
visit(child)
|
|
44
|
+
|
|
45
|
+
visit(tree)
|
|
46
|
+
return spans
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def get_synthetic_spans(code: str) -> Set[Tuple[int, int]]:
|
|
50
|
+
"""Get all synthetic (non-AST) spans."""
|
|
51
|
+
spans = set()
|
|
52
|
+
spans |= get_word_spans(code)
|
|
53
|
+
spans |= get_string_content_spans(code)
|
|
54
|
+
spans |= get_bracket_spans(code)
|
|
55
|
+
spans |= get_line_spans(code)
|
|
56
|
+
spans |= get_indent_paragraph_spans(code)
|
|
57
|
+
spans |= get_comment_block_spans(code)
|
|
58
|
+
return spans
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def expand_selection(
|
|
62
|
+
code: str,
|
|
63
|
+
start: int,
|
|
64
|
+
end: int,
|
|
65
|
+
history: List[Tuple[int, int]]
|
|
66
|
+
) -> Optional[Tuple[int, int, List[Tuple[int, int]]]]:
|
|
67
|
+
"""Expand selection to next span."""
|
|
68
|
+
ast_spans = get_ast_spans(code)
|
|
69
|
+
synthetic = get_synthetic_spans(code)
|
|
70
|
+
all_spans = ast_spans | synthetic
|
|
71
|
+
# For AST fallback, use all AST spans as atomic (stricter validation)
|
|
72
|
+
result = find_next_span(start, end, all_spans, ast_spans, code=code)
|
|
73
|
+
if result:
|
|
74
|
+
return (result[0], result[1], history + [(start, end)])
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def contract_selection(
|
|
79
|
+
code: str,
|
|
80
|
+
start: int,
|
|
81
|
+
end: int,
|
|
82
|
+
history: List[Tuple[int, int]]
|
|
83
|
+
) -> Optional[Tuple[int, int, List[Tuple[int, int]]]]:
|
|
84
|
+
"""Contract selection by popping history."""
|
|
85
|
+
return contract(history)
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Tree-sitter based smart selection for Bash code.
|
|
3
|
+
|
|
4
|
+
Uses tree-sitter-bash for robust parsing that handles incomplete syntax.
|
|
5
|
+
"""
|
|
6
|
+
from typing import List, Tuple, Optional, Set
|
|
7
|
+
import tree_sitter
|
|
8
|
+
import tree_sitter_bash
|
|
9
|
+
|
|
10
|
+
from .selection_utils import (
|
|
11
|
+
get_word_spans,
|
|
12
|
+
get_bracket_spans,
|
|
13
|
+
get_line_spans,
|
|
14
|
+
get_indent_paragraph_spans,
|
|
15
|
+
find_next_span,
|
|
16
|
+
contract,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
_parser = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _get_parser():
|
|
23
|
+
global _parser
|
|
24
|
+
if _parser is None:
|
|
25
|
+
lang = tree_sitter.Language(tree_sitter_bash.language())
|
|
26
|
+
_parser = tree_sitter.Parser(lang)
|
|
27
|
+
return _parser
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Node types that are "atomic" - cannot be split by synthetic spans
|
|
31
|
+
ATOMIC_NODE_TYPES = {
|
|
32
|
+
'word', 'string', 'raw_string', 'ansii_c_string', 'heredoc_body',
|
|
33
|
+
'number', 'variable_name', 'special_variable_name',
|
|
34
|
+
'simple_expansion', 'expansion',
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def get_bash_string_content_spans(code: str) -> Set[Tuple[int, int]]:
|
|
39
|
+
"""Spans for string contents (without quotes) in bash."""
|
|
40
|
+
spans, i = set(), 0
|
|
41
|
+
while i < len(code):
|
|
42
|
+
if code[i] == '"':
|
|
43
|
+
# Double quote - find matching
|
|
44
|
+
j = i + 1
|
|
45
|
+
while j < len(code) and code[j] != '"':
|
|
46
|
+
if code[j] == '\\' and j + 1 < len(code):
|
|
47
|
+
j += 2
|
|
48
|
+
else:
|
|
49
|
+
j += 1
|
|
50
|
+
if j < len(code) and j > i + 1:
|
|
51
|
+
spans.add((i + 1, j))
|
|
52
|
+
i = j + 1 if j < len(code) else j
|
|
53
|
+
elif code[i] == "'":
|
|
54
|
+
# Single quote - literal, no escapes
|
|
55
|
+
j = i + 1
|
|
56
|
+
while j < len(code) and code[j] != "'":
|
|
57
|
+
j += 1
|
|
58
|
+
if j < len(code) and j > i + 1:
|
|
59
|
+
spans.add((i + 1, j))
|
|
60
|
+
i = j + 1 if j < len(code) else j
|
|
61
|
+
elif code[i] == '$' and i + 1 < len(code) and code[i + 1] == "'":
|
|
62
|
+
# $'...' ANSI-C quoting
|
|
63
|
+
j = i + 2
|
|
64
|
+
while j < len(code) and code[j] != "'":
|
|
65
|
+
if code[j] == '\\' and j + 1 < len(code):
|
|
66
|
+
j += 2
|
|
67
|
+
else:
|
|
68
|
+
j += 1
|
|
69
|
+
if j < len(code) and j > i + 2:
|
|
70
|
+
spans.add((i + 2, j))
|
|
71
|
+
i = j + 1 if j < len(code) else j
|
|
72
|
+
else:
|
|
73
|
+
i += 1
|
|
74
|
+
return spans
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def get_bash_comment_block_spans(code: str) -> Set[Tuple[int, int]]:
|
|
78
|
+
"""Spans for contiguous comment blocks."""
|
|
79
|
+
spans, offset, start, end = set(), 0, None, None
|
|
80
|
+
for line in code.split('\n'):
|
|
81
|
+
stripped = line.strip()
|
|
82
|
+
if stripped.startswith('#') and not stripped.startswith('#!'):
|
|
83
|
+
if start is None:
|
|
84
|
+
start = offset
|
|
85
|
+
end = offset + len(line)
|
|
86
|
+
elif start is not None:
|
|
87
|
+
spans.add((start, end))
|
|
88
|
+
start = None
|
|
89
|
+
offset += len(line) + 1
|
|
90
|
+
if start is not None:
|
|
91
|
+
spans.add((start, end))
|
|
92
|
+
return spans
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def get_ast_spans_and_atomic(code: str) -> Tuple[Set[Tuple[int, int]], Set[Tuple[int, int]]]:
|
|
96
|
+
"""
|
|
97
|
+
Get spans for all tree-sitter nodes, plus identify atomic spans.
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
(all_spans, atomic_spans) - atomic spans are nodes that can't be split
|
|
101
|
+
"""
|
|
102
|
+
tree = _get_parser().parse(bytes(code, 'utf8'))
|
|
103
|
+
all_spans = set()
|
|
104
|
+
atomic_spans = set()
|
|
105
|
+
|
|
106
|
+
def visit(node):
|
|
107
|
+
span = (node.start_byte, node.end_byte)
|
|
108
|
+
all_spans.add(span)
|
|
109
|
+
|
|
110
|
+
if node.type in ATOMIC_NODE_TYPES:
|
|
111
|
+
atomic_spans.add(span)
|
|
112
|
+
|
|
113
|
+
for child in node.children:
|
|
114
|
+
visit(child)
|
|
115
|
+
|
|
116
|
+
visit(tree.root_node)
|
|
117
|
+
return all_spans, atomic_spans
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def get_ast_spans(code: str) -> Set[Tuple[int, int]]:
|
|
121
|
+
"""Get spans for all tree-sitter nodes."""
|
|
122
|
+
all_spans, _ = get_ast_spans_and_atomic(code)
|
|
123
|
+
return all_spans
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def get_pipe_sequence_spans(code: str) -> Set[Tuple[int, int]]:
|
|
127
|
+
"""Get spans for individual commands in a pipeline."""
|
|
128
|
+
tree = _get_parser().parse(bytes(code, 'utf8'))
|
|
129
|
+
spans = set()
|
|
130
|
+
|
|
131
|
+
def visit(node):
|
|
132
|
+
# For pipelines, add each command as a span
|
|
133
|
+
if node.type == 'pipeline':
|
|
134
|
+
for child in node.children:
|
|
135
|
+
if child.type not in ('|', '|&'):
|
|
136
|
+
spans.add((child.start_byte, child.end_byte))
|
|
137
|
+
|
|
138
|
+
# For command lists (&&, ||, ;)
|
|
139
|
+
if node.type == 'list':
|
|
140
|
+
for child in node.children:
|
|
141
|
+
if child.type not in ('&&', '||', ';'):
|
|
142
|
+
spans.add((child.start_byte, child.end_byte))
|
|
143
|
+
|
|
144
|
+
for child in node.children:
|
|
145
|
+
visit(child)
|
|
146
|
+
|
|
147
|
+
visit(tree.root_node)
|
|
148
|
+
return spans
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def get_synthetic_spans(code: str) -> Set[Tuple[int, int]]:
|
|
152
|
+
"""Get all synthetic (non-AST) spans for bash."""
|
|
153
|
+
spans = set()
|
|
154
|
+
spans |= get_word_spans(code)
|
|
155
|
+
spans |= get_bash_string_content_spans(code)
|
|
156
|
+
spans |= get_bracket_spans(code)
|
|
157
|
+
spans |= get_line_spans(code)
|
|
158
|
+
spans |= get_indent_paragraph_spans(code)
|
|
159
|
+
spans |= get_bash_comment_block_spans(code)
|
|
160
|
+
spans |= get_pipe_sequence_spans(code)
|
|
161
|
+
return spans
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def get_all_spans(code: str) -> Tuple[Set[Tuple[int, int]], Set[Tuple[int, int]]]:
|
|
165
|
+
"""
|
|
166
|
+
Get all candidate spans and atomic spans for selection.
|
|
167
|
+
|
|
168
|
+
Returns (all_spans, atomic_spans)
|
|
169
|
+
"""
|
|
170
|
+
ast_spans, atomic_spans = get_ast_spans_and_atomic(code)
|
|
171
|
+
synthetic_spans = get_synthetic_spans(code)
|
|
172
|
+
return ast_spans | synthetic_spans, atomic_spans
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def expand_selection(
|
|
176
|
+
code: str,
|
|
177
|
+
start: int,
|
|
178
|
+
end: int,
|
|
179
|
+
history: List[Tuple[int, int]]
|
|
180
|
+
) -> Optional[Tuple[int, int, List[Tuple[int, int]]]]:
|
|
181
|
+
"""Expand selection to next span."""
|
|
182
|
+
ast_spans, atomic_spans = get_ast_spans_and_atomic(code)
|
|
183
|
+
synthetic_spans = get_synthetic_spans(code)
|
|
184
|
+
all_spans = ast_spans | synthetic_spans
|
|
185
|
+
result = find_next_span(start, end, all_spans, atomic_spans, ast_spans, code)
|
|
186
|
+
if result:
|
|
187
|
+
return (result[0], result[1], history + [(start, end)])
|
|
188
|
+
return None
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def contract_selection(
|
|
192
|
+
code: str,
|
|
193
|
+
start: int,
|
|
194
|
+
end: int,
|
|
195
|
+
history: List[Tuple[int, int]]
|
|
196
|
+
) -> Optional[Tuple[int, int, List[Tuple[int, int]]]]:
|
|
197
|
+
"""Contract selection by popping history."""
|
|
198
|
+
return contract(history)
|
|
@@ -313,9 +313,7 @@ class PythonCompleter(Completer):
|
|
|
313
313
|
|
|
314
314
|
# Import statements
|
|
315
315
|
if re.fullmatch(r'\s*(from|import)\s+\w*', before_line):
|
|
316
|
-
|
|
317
|
-
bash_candidates = [Candidate(name='!'+name) for name in rp.r._get_sys_commands_cache]
|
|
318
|
-
return python_candidates + bash_candidates
|
|
316
|
+
return [Candidate(name=name) for name in get_all_importable_module_names()]
|
|
319
317
|
|
|
320
318
|
# First Word Completions - should be super fast, much faster than Jedi
|
|
321
319
|
if not text:
|