fix doc-comment on ncplane_erase_region

and another minor typo
pull/2205/head
joseLuís 3 years ago
parent ff9497ea3d
commit fb003c4eef

@ -2250,8 +2250,8 @@ API void ncplane_erase(struct ncplane* n);
// (-1, -1, 0, -1): clears the column to the left of the cursor (column 4)
// (-1, -1, INT_MAX, 0): clears all rows with or below the cursor (rows 10--19)
// (-1, -1, -INT_MAX, 0): clears all rows with or above the cursor (rows 0--10)
// (-1, 4, 3, 3): clears from row 10, column 4 through row 12, column 6
// (-1, 4, 3, 3): clears from row 10, column 4 through row 8, column 2
// (-1, 4, 3, 3): clears from row 5, column 4 through row 7, column 6
// (-1, 4, -3, -3): clears from row 5, column 4 through row 3, column 2
// (4, -1, 0, 3): clears columns 5, 6, and 7
// (-1, -1, 0, 0): clears the plane *if the cursor is in a legal position*
// (0, 0, 0, 0): clears the plane in all cases

@ -254,7 +254,7 @@ int ncdirect_cursor_move_yx(ncdirect* n, int y, int x){
// determine whether we're inverted.
// * if both dimensions changed, determine whether we're inverted by checking
// the change. the row ought have decreased; the column ought have increased.
// * move back to intiial position / pop cursor position
// * move back to initial position / pop cursor position
static int
detect_cursor_inversion(ncdirect* n, const char* u7, int rows, int cols, int* y, int* x){
if(rows <= 1 || cols <= 1){ // FIXME can this be made to work in 1 dimension?

Loading…
Cancel
Save