Expirmental improvements to highlight tracking.

This commit is contained in:
Storm Dragon
2025-07-09 01:06:54 -04:00
parent 2ad754a372
commit 5e858cfde1
7 changed files with 543 additions and 1 deletions

View File

@ -24,6 +24,27 @@ class command:
)
def run(self):
# Check if we're in table mode first
is_table_mode = self.env["runtime"]["TableManager"].is_table_mode()
if is_table_mode:
table_info = self.env["runtime"]["TableManager"].move_to_first_cell()
if table_info:
output_text = (
f"{table_info['cell_content']} {table_info['column_header']}"
)
self.env["runtime"]["OutputManager"].present_text(
output_text, interrupt=True, flush=False
)
self.env["runtime"]["OutputManager"].present_text(
_("first cell"), interrupt=False
)
else:
self.env["runtime"]["OutputManager"].present_text(
_("no table data"), interrupt=True, flush=False
)
return
# Regular line begin navigation (when not in table mode)
cursor_pos = self.env["runtime"][
"CursorManager"
].get_review_or_text_cursor()

View File

@ -24,6 +24,27 @@ class command:
)
def run(self):
# Check if we're in table mode first
is_table_mode = self.env["runtime"]["TableManager"].is_table_mode()
if is_table_mode:
table_info = self.env["runtime"]["TableManager"].move_to_last_cell()
if table_info:
output_text = (
f"{table_info['cell_content']} {table_info['column_header']}"
)
self.env["runtime"]["OutputManager"].present_text(
output_text, interrupt=True, flush=False
)
self.env["runtime"]["OutputManager"].present_text(
_("last cell"), interrupt=False
)
else:
self.env["runtime"]["OutputManager"].present_text(
_("no table data"), interrupt=True, flush=False
)
return
# Regular line end navigation (when not in table mode)
cursor_pos = self.env["runtime"][
"CursorManager"
].get_review_or_text_cursor()

View File

@ -23,6 +23,29 @@ class command:
return _("Move Review to the first character on the line")
def run(self):
# Check if we're in table mode first
is_table_mode = self.env["runtime"]["TableManager"].is_table_mode()
if is_table_mode:
table_info = self.env["runtime"]["TableManager"].move_to_first_char_in_cell()
if table_info:
char_utils.present_char_for_review(
self.env,
table_info['character'],
interrupt=True,
announce_capital=True,
flush=False,
)
self.env["runtime"]["OutputManager"].present_text(
_("first character in cell {0}").format(table_info['column_header']),
interrupt=False,
)
else:
self.env["runtime"]["OutputManager"].present_text(
_("no table data"), interrupt=True, flush=False
)
return
# Regular line first character navigation (when not in table mode)
cursor_pos = self.env["runtime"][
"CursorManager"
].get_review_or_text_cursor()

View File

@ -22,6 +22,29 @@ class command:
return _("Move Review to the last character on the line")
def run(self):
# Check if we're in table mode first
is_table_mode = self.env["runtime"]["TableManager"].is_table_mode()
if is_table_mode:
table_info = self.env["runtime"]["TableManager"].move_to_last_char_in_cell()
if table_info:
char_utils.present_char_for_review(
self.env,
table_info['character'],
interrupt=True,
announce_capital=True,
flush=False,
)
self.env["runtime"]["OutputManager"].present_text(
_("last character in cell {0}").format(table_info['column_header']),
interrupt=False,
)
else:
self.env["runtime"]["OutputManager"].present_text(
_("no table data"), interrupt=True, flush=False
)
return
# Regular line last character navigation (when not in table mode)
cursor_pos = self.env["runtime"][
"CursorManager"
].get_review_or_text_cursor()