File tree Expand file tree Collapse file tree 7 files changed +19
-15
lines changed Expand file tree Collapse file tree 7 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ def spawn_server(self):
81
81
while True :
82
82
try :
83
83
self .server_port = random .randint (1024 , 65535 )
84
- logger .debug (f"AutoCompletion PORT={ self .server_port } " )
84
+ logger .info (f"AutoCompletion PORT={ self .server_port } " )
85
85
command = [
86
86
sys .executable ,
87
87
str (lang_server_path .absolute ()),
Original file line number Diff line number Diff line change 23
23
24
24
25
25
def true_exit ():
26
- logger .debug ("EXIT CALLED" )
26
+ logger .info ("EXIT CALLED" )
27
27
write_config ()
28
28
safe_close_connections ()
29
29
@@ -44,7 +44,7 @@ def __init__(self) -> None:
44
44
shared .linter = Linter ()
45
45
self .debugger = Debugger ()
46
46
shared .history = HistoryManager ()
47
- logger .debug ("CORE INITIALIZED" )
47
+ logger .info ("CORE INITIALIZED" )
48
48
49
49
def win_init (self ):
50
50
pygame .display .set_caption (shared .APP_NAME )
@@ -58,7 +58,7 @@ def win_init(self):
58
58
else :
59
59
self .fps = refresh_rate / 2
60
60
61
- logger .debug (f"RUNNING AT { self .fps } FPS" )
61
+ logger .info (f"RUNNING AT { self .fps } FPS" )
62
62
63
63
shared .srect = shared .screen .get_rect ()
64
64
shared .frame_cache = {}
@@ -103,7 +103,7 @@ def on_ctrl_question(self):
103
103
pygame .image .save (shared .screen , Path ("/home/axis/p/editor/showcase.png" ))
104
104
query = "convert ~/p/editor/showcase.png \( +clone -background black -shadow 50x10+15+15 \) +swap -background none -layers merge +repage ~/p/editor/showcase.png"
105
105
os .system (query )
106
- logger .debug ("Showcased screenshot" )
106
+ logger .info ("Showcased screenshot" )
107
107
108
108
def update (self ):
109
109
self .shared_frame_refresh ()
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def apply_config():
32
32
shared .config = get_config ()
33
33
shared .FONT_SIZE = shared .config ["font" ]["size" ]
34
34
if shared .config ["font" ]["path" ] not in ("default" , False ):
35
- logger .debug ("Applying path font" )
35
+ logger .info ("Applying path font" )
36
36
shared .FONT = pygame .Font (
37
37
shared .config ["font" ]["path" ], shared .config ["font" ]["size" ]
38
38
)
@@ -41,7 +41,7 @@ def apply_config():
41
41
shared .FONT_HEIGHT = shared .FONT .get_height ()
42
42
43
43
elif shared .config ["font" ]["family" ]:
44
- logger .debug ("Apply family font" )
44
+ logger .info ("Apply family font" )
45
45
shared .FONT = pygame .sysfont .SysFont (
46
46
shared .config ["font" ]["family" ], shared .config ["font" ]["size" ]
47
47
)
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def update(self):
28
28
max_line_digits = len (f"{ shared .cursor_pos .y + end_of_page_lno :.0f} " )
29
29
shared .line_number_digits = max_line_digits + 4
30
30
31
- # logger.debug (
31
+ # logger.info (
32
32
# f"{end_of_page_lno=}, {max_line_digits=}, {shared.line_number_digits=}"
33
33
# )
34
34
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ def spawn_server(self):
49
49
while True :
50
50
try :
51
51
self .server_port = random .randint (1024 , 65535 )
52
- logger .debug (f"Linter PORT={ self .server_port } " )
52
+ logger .info (f"Linter PORT={ self .server_port } " )
53
53
command = [
54
54
sys .executable ,
55
55
str (lang_server_path .absolute ()),
@@ -175,7 +175,12 @@ def render_squigline(
175
175
bound_rect = squiggly_surf .get_bounding_rect ()
176
176
if shared .config ["squiggly" ]["type" ] == "cut-off" :
177
177
bound_rect .width = squiggly_bum
178
- squiggly_surf = squiggly_surf .subsurface (bound_rect ).copy ()
178
+ try :
179
+ squiggly_surf = squiggly_surf .subsurface (bound_rect ).copy ()
180
+ except ValueError :
181
+ logger .debug (bound_rect )
182
+ logger .debug (squiggly_bum )
183
+ pass
179
184
180
185
squiggly_rect = pygame .Rect (
181
186
(
@@ -187,7 +192,6 @@ def render_squigline(
187
192
if shared .config ["squiggly" ]["type" ] == "centered-free" :
188
193
squiggly_rect = squiggly_surf .get_rect (center = squiggly_rect .center )
189
194
else :
190
- ...
191
195
squiggly_rect .y += shared .FONT_HEIGHT * 0.5
192
196
editor_surf .blit (squiggly_surf , squiggly_rect )
193
197
Original file line number Diff line number Diff line change 22
22
23
23
class CustomFormatter (logging .Formatter ):
24
24
COLORS = {
25
- logging .DEBUG : colorama .Fore .GREEN ,
26
- logging .INFO : colorama .Fore .WHITE ,
25
+ logging .DEBUG : colorama .Fore .WHITE ,
26
+ logging .INFO : colorama .Fore .GREEN ,
27
27
logging .WARNING : colorama .Fore .YELLOW ,
28
28
logging .ERROR : colorama .Fore .RED ,
29
29
logging .CRITICAL : colorama .Fore .MAGENTA ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def on_percent() -> None:
22
22
row : list
23
23
try :
24
24
start_find = shared .cursor_pos .x + 1 if y_offset == 0 else 0
25
- # logger.debug (f"{"".join(row)=}, {brakies[current_char]=}, {start_find=}")
25
+ # logger.info (f"{"".join(row)=}, {brakies[current_char]=}, {start_find=}")
26
26
27
27
ignore_count = 0
28
28
for i , char in enumerate (row [start_find :]):
@@ -56,7 +56,7 @@ def on_percent() -> None:
56
56
start_find = shared .cursor_pos .x if y_offset == 0 else len (row )
57
57
58
58
ignore_count = 0
59
- # logger.debug (row[:start_find][::-1])
59
+ # logger.info (row[:start_find][::-1])
60
60
for i , char in enumerate (row [:start_find ][::- 1 ]):
61
61
if char == current_char :
62
62
ignore_count += 1
You can’t perform that action at this time.
0 commit comments