How to move the caret to the document map?

Submitted by: Tung Fu (PTC) Last Updated: 2006-08-02

function goto_docmap(w=current_window) {  local wins[]; local count = window_list(wins, "edit", w); local i;  for (i = count; i > 0; i--) { if (window_get(wins[i], "docmapview")) { local winname = "window".wins[i]; caret $winname; break; }  } }