def sync_window(edit_buffer, edit_posn)
      unless check_margins(edit_buffer.length, edit_posn)
        window_buffer.clear
        @show_prompt = true
      end

      image = build_screen_image(edit_buffer)
      update_screen(image)
      @window_buffer = image
    end
def sync_window(edit_buffer, edit_posn)
      unless check_margins(edit_buffer.length, edit_posn)
        window_buffer.clear
        @show_prompt = true
      end

      image = build_screen_image(edit_buffer)
      update_screen(image)
      @window_buffer = image
    end
Keep the edit window in sync!