suplemon-editor 0.3.2__tar.gz → 0.3.3__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.
- {suplemon_editor-0.3.2/suplemon_editor.egg-info → suplemon_editor-0.3.3}/PKG-INFO +1 -1
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/main.py +17 -5
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3/suplemon_editor.egg-info}/PKG-INFO +1 -1
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/LICENSE +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/MANIFEST.in +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/README.md +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/setup.cfg +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/setup.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/__init__.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/__main__.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/cli.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/config/defaults.json +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/config/keymap.json +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/config.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/cursor.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/editor.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/file.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/help.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/helpers.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/hex2xterm.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/key_mappings.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/lexer.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/line.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/__init__.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/color_map.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/css.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/diff.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/html.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/js.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/json.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/lua.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/md.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/php.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/linelight/py.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/logger.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/module_loader.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/application_state.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/autocomplete.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/autodocstring.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/battery.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/bulk_delete.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/clock.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/comment.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/config.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/date.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/diff.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/eval.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/hostname.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/input_test.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/keymap.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/linter.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/lower.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/lstrip.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/paste.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/reload.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/replace_all.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/reverse.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/rstrip.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/save.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/save_all.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/sort_lines.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/strip.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/system_clipboard.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/tabstospaces.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/toggle_whitespace.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/modules/upper.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/prompt.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/suplemon_module.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/themes/8colors.tmTheme +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/themes/monokai.tmTheme +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/themes.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/ui.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon/viewer.py +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon_editor.egg-info/SOURCES.txt +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon_editor.egg-info/dependency_links.txt +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon_editor.egg-info/entry_points.txt +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon_editor.egg-info/requires.txt +0 -0
- {suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon_editor.egg-info/top_level.txt +0 -0
|
@@ -6,6 +6,7 @@ The main class that starts and runs Suplemon.
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
import os
|
|
9
|
+
import curses
|
|
9
10
|
import sys
|
|
10
11
|
|
|
11
12
|
from . import ui
|
|
@@ -18,7 +19,13 @@ from .logger import logger
|
|
|
18
19
|
from .config import Config
|
|
19
20
|
from .editor import Editor
|
|
20
21
|
|
|
21
|
-
__version__ = "0.3.
|
|
22
|
+
__version__ = "0.3.3"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# ncurses only defines BUTTON5 when built with NCURSES_MOUSE_VERSION 2.
|
|
26
|
+
# Without it there is no wheel-down event to match, so scrolling down is
|
|
27
|
+
# simply unavailable rather than mismatched.
|
|
28
|
+
BUTTON5_PRESSED = getattr(curses, "BUTTON5_PRESSED", 0)
|
|
22
29
|
|
|
23
30
|
|
|
24
31
|
class App:
|
|
@@ -340,13 +347,18 @@ class App:
|
|
|
340
347
|
:rtype: boolean
|
|
341
348
|
"""
|
|
342
349
|
editor = self.get_editor()
|
|
343
|
-
|
|
350
|
+
code = event.mouse_code
|
|
351
|
+
# These were hardcoded integers matching NCURSES_MOUSE_VERSION 1,
|
|
352
|
+
# which gave each button six bits. Version 2 packs them into five to
|
|
353
|
+
# make room for button 5, so every value except BUTTON1_RELEASED
|
|
354
|
+
# moved and only left click still worked. Ask curses instead.
|
|
355
|
+
if code & curses.BUTTON1_RELEASED:
|
|
344
356
|
editor.set_single_cursor(event.mouse_pos)
|
|
345
|
-
elif
|
|
357
|
+
elif code & curses.BUTTON3_RELEASED:
|
|
346
358
|
editor.add_cursor(event.mouse_pos)
|
|
347
|
-
elif
|
|
359
|
+
elif code & curses.BUTTON4_PRESSED: # Wheel up
|
|
348
360
|
editor.jump_up()
|
|
349
|
-
elif
|
|
361
|
+
elif BUTTON5_PRESSED and code & BUTTON5_PRESSED:
|
|
350
362
|
editor.jump_down()
|
|
351
363
|
else:
|
|
352
364
|
return False
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{suplemon_editor-0.3.2 → suplemon_editor-0.3.3}/suplemon_editor.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|