From 00e28cc569a0e3c02d4e74a4c2a4e6d324ea734f Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 5 Jul 2021 23:42:51 -0400 Subject: [PATCH] complete ncplane_cursor_move_yx() documentation --- USAGE.md | 4 ++-- doc/man/man3/notcurses_plane.3.md | 2 +- include/notcurses/notcurses.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/USAGE.md b/USAGE.md index 27546b9c2..23817fa61 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1103,8 +1103,8 @@ memory. ```c // Move the cursor to the specified position (the cursor needn't be visible). -// Returns -1 on error, including negative parameters, or ones exceeding the -// plane's dimensions. +// Pass -1 as either coordinate to hold that axis constant. Returns -1 if the +// move would place the cursor outside the plane. int ncplane_cursor_move_yx(struct ncplane* n, int y, int x); // Get the current position of the cursor within n. y and/or x may be NULL. diff --git a/doc/man/man3/notcurses_plane.3.md b/doc/man/man3/notcurses_plane.3.md index 56332c726..ab71f6c5b 100644 --- a/doc/man/man3/notcurses_plane.3.md +++ b/doc/man/man3/notcurses_plane.3.md @@ -286,7 +286,7 @@ it will not be visible following rasterization; it can also be partially off-screen. A plane has a virtual cursor; move it with **ncplane_cursor_move_yx**. -Specifying -1 as one or both coordinates will hold that axis constant. Unless +Specifying -1 as either coordinate will hold that axis constant. Unless coordinates are specified for a call, action takes place at the plane's virtual cursor, which automatically moves along with output. The current virtual cursor location can be acquired with **ncplane_cursor_yx**. diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index e0fbdedf3..bf4b0d2a2 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -1639,8 +1639,8 @@ ncplane_valign(const struct ncplane* n, ncalign_e align, int r){ } // Move the cursor to the specified position (the cursor needn't be visible). -// Returns -1 on error, including negative parameters, or ones exceeding the -// plane's dimensions. +// Pass -1 as either coordinate to hold that axis constant. Returns -1 if the +// move would place the cursor outside the plane. API int ncplane_cursor_move_yx(struct ncplane* n, int y, int x); // Move the cursor to 0, 0. Can't fail.