commit e6c6a72ee80bd63593ac9684c4d0946ea31d5705
parent 4a853cf451bc98fb4b1f62a55c2585aa9fc2291a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 11 Jul 2018 09:56:39 +0200
tweaks: remove some braces that are now superfluous
Also move a function to a better place: after the function that it calls.
Diffstat:
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/src/prompt.c b/src/prompt.c
@@ -38,11 +38,10 @@ int do_statusbar_mouse(void)
size_t start_col = strlenpt(prompt) + 2;
/* Move to where the click occurred. */
- if (click_row == 0 && click_col >= start_col) {
+ if (click_row == 0 && click_col >= start_col)
statusbar_x = actual_x(answer,
get_statusbar_page_start(start_col, start_col +
statusbar_xplustabs()) + click_col - start_col);
- }
}
return retval;
@@ -232,26 +231,15 @@ void do_statusbar_end(void)
/* Move left one character. */
void do_statusbar_left(void)
{
- if (statusbar_x > 0) {
+ if (statusbar_x > 0)
statusbar_x = move_mbleft(answer, statusbar_x);
- }
}
/* Move right one character. */
void do_statusbar_right(void)
{
- if (answer[statusbar_x] != '\0') {
+ if (answer[statusbar_x] != '\0')
statusbar_x = move_mbright(answer, statusbar_x);
- }
-}
-
-/* Backspace over one character. */
-void do_statusbar_backspace(void)
-{
- if (statusbar_x > 0) {
- statusbar_x = move_mbleft(answer, statusbar_x);
- do_statusbar_delete();
- }
}
/* Delete one character. */
@@ -265,6 +253,15 @@ void do_statusbar_delete(void)
}
}
+/* Backspace over one character. */
+void do_statusbar_backspace(void)
+{
+ if (statusbar_x > 0) {
+ statusbar_x = move_mbleft(answer, statusbar_x);
+ do_statusbar_delete();
+ }
+}
+
/* Zap some or all text from the answer. */
void do_statusbar_cut_text(void)
{