pyqt-code-editor 0.0.50__tar.gz → 0.0.52__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.
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/PKG-INFO +1 -1
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/__init__.py +1 -1
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/auto_pair.py +5 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/highlight_matching_brackets.py +1 -1
- pyqt_code_editor-0.0.52/pyqt_code_editor/mixins/merge_undo_actions.py +32 -0
- pyqt_code_editor-0.0.50/pyqt_code_editor/mixins/merge_undo_actions.py +0 -12
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/COPYING +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyproject.toml +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/_settings.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/app.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/code_editors.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/languages/javascript.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/languages/markdown.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/languages/python.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/languages/text.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/editor_panel.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/find_in_files.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/jupyter_console.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/project_explorer.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/settings_panel.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/sigmund.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/workspace_explorer.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/environment_manager.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/auto_indent.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/base.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/check.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/comment.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/complete.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/execute.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/file_link.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/line_number.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/python_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/search_replace.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/shortcuts.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/smart_backspace_delete.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/symbols.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/theme.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/zoom.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/sigmund-analyst.png +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/signal_router.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/syntax_highlighters/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/syntax_highlighters/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/syntax_highlighters/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/syntax_highlighters/languages/python.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/syntax_highlighters/syntax_highlighter.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/themes.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/utils/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/utils/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/utils/languages/python/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/utils/languages/python/_auto_indent.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/utils/languages/python/_extract_cells.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/utils/languages/python/_mask_str_in_code.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/watchdog.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/calltip_widget.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/completion_popup.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/dock.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/quick_open_dialog.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/quick_open_file_dialog.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/quick_symbol_dialog.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/search_replace_frame.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/tab_splitter.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/tabbed_editor.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/languages/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/languages/generic.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/languages/python.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/manager.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/process.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/__init__.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/codestral.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/jedi.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/ruff.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/sigmund.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/symbol.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/tree_sitter.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/settings.py +0 -0
- {pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/readme.md +0 -0
|
@@ -39,6 +39,11 @@ class AutoPair:
|
|
|
39
39
|
selected_text = cursor.selectedText()
|
|
40
40
|
doc_text = self.toPlainText()
|
|
41
41
|
doc_len = len(doc_text)
|
|
42
|
+
# If the old cursor position is beyond the length of the document, then
|
|
43
|
+
# we don't need to do anything.
|
|
44
|
+
if old_pos >= doc_len:
|
|
45
|
+
super().keyPressEvent(event)
|
|
46
|
+
return
|
|
42
47
|
# Get character before cursor
|
|
43
48
|
if old_pos > 0:
|
|
44
49
|
char_before = doc_text[old_pos - 1]
|
|
@@ -83,7 +83,7 @@ class HighlightMatchingBrackets:
|
|
|
83
83
|
|
|
84
84
|
# Create yellow background format
|
|
85
85
|
fmt = QTextCharFormat()
|
|
86
|
-
fmt.setBackground(QColor(255, 255, 0,
|
|
86
|
+
fmt.setBackground(QColor(255, 255, 0, 50)) # Yellow with some transparency
|
|
87
87
|
|
|
88
88
|
selection = QTextEdit.ExtraSelection()
|
|
89
89
|
selection.cursor = cursor
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from qtpy.QtCore import Qt
|
|
2
|
+
from qtpy.QtGui import QTextCursor
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class MergeUndoActions:
|
|
6
|
+
"""Ensures that all changes made as part of a key press result in a
|
|
7
|
+
single edit block for undo purposes. This class should be the first
|
|
8
|
+
mixin of the list.
|
|
9
|
+
"""
|
|
10
|
+
def keyPressEvent(self, event):
|
|
11
|
+
# Navigation keys that should NOT be wrapped in edit blocks. This
|
|
12
|
+
# causes a specific issue with the cursor jumping to the start of a
|
|
13
|
+
# line when navigating vertically.
|
|
14
|
+
navigation_keys = {
|
|
15
|
+
Qt.Key.Key_Up, Qt.Key.Key_Down,
|
|
16
|
+
Qt.Key.Key_Left, Qt.Key.Key_Right,
|
|
17
|
+
Qt.Key.Key_Home, Qt.Key.Key_End,
|
|
18
|
+
Qt.Key.Key_PageUp, Qt.Key.Key_PageDown
|
|
19
|
+
}
|
|
20
|
+
is_navigation = (event.key() in navigation_keys and
|
|
21
|
+
not (event.modifiers() & Qt.KeyboardModifier.ShiftModifier))
|
|
22
|
+
if is_navigation:
|
|
23
|
+
super().keyPressEvent(event)
|
|
24
|
+
return
|
|
25
|
+
# Wrap all other keys (editing operations) in a single edit block to
|
|
26
|
+
# unify changes into a single undo action
|
|
27
|
+
cursor = QTextCursor(self.document())
|
|
28
|
+
cursor.beginEditBlock()
|
|
29
|
+
try:
|
|
30
|
+
super().keyPressEvent(event)
|
|
31
|
+
finally:
|
|
32
|
+
cursor.endEditBlock()
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
class MergeUndoActions:
|
|
2
|
-
"""Ensures that all changes made as part of a key press result in a
|
|
3
|
-
single edit block for undo purposes. This class should be the first
|
|
4
|
-
mixin of the list.
|
|
5
|
-
"""
|
|
6
|
-
def keyPressEvent(self, event):
|
|
7
|
-
cursor = self.textCursor()
|
|
8
|
-
cursor.beginEditBlock()
|
|
9
|
-
try:
|
|
10
|
-
super().keyPressEvent(event)
|
|
11
|
-
finally:
|
|
12
|
-
cursor.endEditBlock()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/code_editors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/code_editors/languages/text.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/editor_panel.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/find_in_files.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/jupyter_console.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/project_explorer.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/components/settings_panel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/python_auto_indent.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/search_replace.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/mixins/widgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/syntax_highlighters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/utils/languages/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/calltip_widget.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/completion_popup.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/quick_open_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/quick_symbol_dialog.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/search_replace_frame.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/tab_splitter.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/widgets/tabbed_editor.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/languages/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/languages/generic.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/languages/python.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/__init__.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/codestral.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/jedi.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/ruff.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/sigmund.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/symbol.py
RENAMED
|
File without changes
|
{pyqt_code_editor-0.0.50 → pyqt_code_editor-0.0.52}/pyqt_code_editor/worker/providers/tree_sitter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|