# File lib/sup/modes/thread-view-mode.rb, line 460 def jump_to_message m, force_alignment=false l = @layout[m] ## boundaries of the message message_left = l.depth * INDENT_SPACES message_right = message_left + l.width ## calculate leftmost colum left = if force_alignment # force mode: align exactly message_left else # regular: minimize cursor movement ## leftmost and rightmost are boundaries of all valid left-column ## alignments. leftmost = [message_left, message_right - buffer.content_width + 1].min rightmost = message_left leftcol.clamp(leftmost, rightmost) end jump_to_line l.top # move vertically jump_to_col left # move horizontally set_cursor_pos l.top # set cursor pos end