def script_announce_scope(self, gesture):
info=api.getReviewPosition().copy()
info.expand(textInfos.UNIT_LINE)
line_text = info.text
if not line_text:
ui.message(_("No text found"))
return
char, position = find_indent(line_text)
if position == 0:
ui.message(_("Not indented"))
return
for line in previous_lines(info):
prev_line_text = line.text
if not prev_line_text.strip():
continue
new_char, new_position = find_indent(prev_line_text)
if new_position < position:
if new_position == 0 or new_char == char:
ui.message(prev_line_text)
return
评论列表
文章目录