From f5c87a7fee9d11510c884b0b4608e6f0e6d88d78 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 27 Jan 2018 20:00:14 +0100 Subject: [PATCH] tweaks: swap the row and col parameters to a more consistent order --- src/browser.c | 2 +- src/help.c | 4 ++-- src/nano.c | 2 +- src/prompt.c | 2 +- src/proto.h | 2 +- src/winio.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/browser.c b/src/browser.c index 220c4491..fda71298 100644 --- a/src/browser.c +++ b/src/browser.c @@ -121,7 +121,7 @@ char *do_browser(char *path) int mouse_x, mouse_y; /* We can click on the edit window to select a filename. */ - if (get_mouseinput(&mouse_x, &mouse_y, TRUE) == 0 && + if (get_mouseinput(&mouse_y, &mouse_x, TRUE) == 0 && wmouse_trafo(edit, &mouse_y, &mouse_x, FALSE)) { /* longest is the width of each column. There * are two spaces between each column. */ diff --git a/src/help.c b/src/help.c index c92298a7..948a6651 100644 --- a/src/help.c +++ b/src/help.c @@ -220,8 +220,8 @@ void do_help(void) #endif #ifdef ENABLE_MOUSE } else if (kbinput == KEY_MOUSE) { - int dummy_x, dummy_y; - get_mouseinput(&dummy_x, &dummy_y, TRUE); + int dummy_row, dummy_col; + get_mouseinput(&dummy_row, &dummy_col, TRUE); #endif } else if (func == do_exit) { /* Exit from the help viewer. */ diff --git a/src/nano.c b/src/nano.c index 56c36e86..12543dd4 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1565,7 +1565,7 @@ void unbound_key(int code) int do_mouse(void) { int click_row, click_col; - int retval = get_mouseinput(&click_col, &click_row, TRUE); + int retval = get_mouseinput(&click_row, &click_col, TRUE); /* If the click is wrong or already handled, we're done. */ if (retval != 0) diff --git a/src/prompt.c b/src/prompt.c index 1db014f2..c067a3fb 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -33,7 +33,7 @@ static size_t statusbar_x = HIGHEST_POSITIVE; int do_statusbar_mouse(void) { int click_row, click_col; - int retval = get_mouseinput(&click_col, &click_row, TRUE); + int retval = get_mouseinput(&click_row, &click_col, TRUE); /* We can click on the statusbar window text to move the cursor. */ if (retval == 0 && wmouse_trafo(bottomwin, &click_row, &click_col, FALSE)) { diff --git a/src/proto.h b/src/proto.h index a2cba42d..a7d90689 100644 --- a/src/proto.h +++ b/src/proto.h @@ -629,7 +629,7 @@ int get_control_kbinput(int kbinput); int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len); int *parse_verbatim_kbinput(WINDOW *win, size_t *count); #ifdef ENABLE_MOUSE -int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts); +int get_mouseinput(int *mouse_row, int *mouse_col, bool allow_shortcuts); #endif const sc *get_shortcut(int *kbinput); void blank_row(WINDOW *win, int y, int x, int n); diff --git a/src/winio.c b/src/winio.c index 7fe0f17e..c1497384 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1597,7 +1597,7 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count) * it's been handled by putting back keystrokes that need to be handled. * or 2 if it's been ignored. Assume that KEY_MOUSE has already been * read in. */ -int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts) +int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts) { MEVENT mevent; bool in_bottomwin;