[3.8] Doc: Fix link to window.getch in curses documentation (GH-16132) (GH-16135)

(cherry picked from commit a26ace19bddea2d7a999a6de8286b3f27b132f35)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst
index 7d1e753..cbd6883 100644
--- a/Doc/library/curses.rst
+++ b/Doc/library/curses.rst
@@ -1283,7 +1283,7 @@
 
 .. data:: ERR
 
-   Some curses routines  that  return  an integer, such as  :func:`getch`, return
+   Some curses routines  that  return  an integer, such as :meth:`~window.getch`, return
    :const:`ERR` upon failure.