def METHOD_NAME(window, view, after):
    # type: (sublime.Window, sublime.View, sublime.View) -> None
    view_group, current_index = window.get_view_index(view)
    group, index = window.get_view_index(after)
    if view_group == group:
        wanted_index = index + 1 if index < current_index else index
        window.set_view_index(view, group, wanted_index)