@@ -207,33 +207,33 @@ class BgColor(AnsiSequence):
207
207
208
208
209
209
####################################################################################
210
- # Implementations intended for direct use
210
+ # Implementations intended for direct use (do NOT use outside of cmd2)
211
211
####################################################################################
212
212
class Cursor :
213
213
"""Create ANSI sequences to alter the cursor position."""
214
214
215
215
@staticmethod
216
- def UP (count : int = 1 ) -> str :
216
+ def up (count : int = 1 ) -> str :
217
217
"""Move the cursor up a specified amount of lines (Defaults to 1)."""
218
218
return f"{ CSI } { count } A"
219
219
220
220
@staticmethod
221
- def DOWN (count : int = 1 ) -> str :
221
+ def down (count : int = 1 ) -> str :
222
222
"""Move the cursor down a specified amount of lines (Defaults to 1)."""
223
223
return f"{ CSI } { count } B"
224
224
225
225
@staticmethod
226
- def FORWARD (count : int = 1 ) -> str :
226
+ def forward (count : int = 1 ) -> str :
227
227
"""Move the cursor forward a specified amount of lines (Defaults to 1)."""
228
228
return f"{ CSI } { count } C"
229
229
230
230
@staticmethod
231
- def BACK (count : int = 1 ) -> str :
231
+ def back (count : int = 1 ) -> str :
232
232
"""Move the cursor back a specified amount of lines (Defaults to 1)."""
233
233
return f"{ CSI } { count } D"
234
234
235
235
@staticmethod
236
- def SET_POS (x : int , y : int ) -> str :
236
+ def set_pos (x : int , y : int ) -> str :
237
237
"""Set the cursor position to coordinates which are 1-based."""
238
238
return f"{ CSI } { y } ;{ x } H"
239
239
@@ -1059,11 +1059,11 @@ def async_alert_str(*, terminal_columns: int, prompt: str, line: str, cursor_off
1059
1059
1060
1060
# Move the cursor down to the last input line
1061
1061
if cursor_input_line != num_input_terminal_lines :
1062
- terminal_str += Cursor .DOWN (num_input_terminal_lines - cursor_input_line )
1062
+ terminal_str += Cursor .down (num_input_terminal_lines - cursor_input_line )
1063
1063
1064
1064
# Clear each line from the bottom up so that the cursor ends up on the first prompt line
1065
1065
total_lines = num_prompt_terminal_lines + num_input_terminal_lines
1066
- terminal_str += (clear_line () + Cursor .UP (1 )) * (total_lines - 1 )
1066
+ terminal_str += (clear_line () + Cursor .up (1 )) * (total_lines - 1 )
1067
1067
1068
1068
# Clear the first prompt line
1069
1069
terminal_str += clear_line ()
0 commit comments