tweaks: elide a one-line function -- no, a half-line function
parent
769504c495
commit
a31896011a
12
src/prompt.c
12
src/prompt.c
|
@ -43,7 +43,7 @@ int do_statusbar_mouse(void)
|
||||||
if (click_row == 0 && click_col >= start_col)
|
if (click_row == 0 && click_col >= start_col)
|
||||||
typing_x = actual_x(answer,
|
typing_x = actual_x(answer,
|
||||||
get_statusbar_page_start(start_col, start_col +
|
get_statusbar_page_start(start_col, start_col +
|
||||||
statusbar_xplustabs()) + click_col - start_col);
|
strnlenpt(answer, typing_x)) + click_col - start_col);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
@ -340,12 +340,6 @@ void do_statusbar_verbatim_input(void)
|
||||||
free(kbinput);
|
free(kbinput);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the zero-based column position of the cursor in the answer. */
|
|
||||||
size_t statusbar_xplustabs(void)
|
|
||||||
{
|
|
||||||
return strnlenpt(answer, typing_x);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Paste the first line of the cutbuffer into the current answer. */
|
/* Paste the first line of the cutbuffer into the current answer. */
|
||||||
void do_statusbar_uncut_text(void)
|
void do_statusbar_uncut_text(void)
|
||||||
{
|
{
|
||||||
|
@ -413,8 +407,8 @@ void draw_the_promptbar(void)
|
||||||
wmove(bottomwin, 0, 0);
|
wmove(bottomwin, 0, 0);
|
||||||
wrefresh(bottomwin);
|
wrefresh(bottomwin);
|
||||||
|
|
||||||
/* Place the cursor at typing_x in the answer. */
|
/* Place the cursor at the right spot. */
|
||||||
column = base + statusbar_xplustabs();
|
column = base + strnlenpt(answer, typing_x);
|
||||||
wmove(bottomwin, 0, column - get_statusbar_page_start(base, column));
|
wmove(bottomwin, 0, column - get_statusbar_page_start(base, column));
|
||||||
wnoutrefresh(bottomwin);
|
wnoutrefresh(bottomwin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -460,7 +460,6 @@ void do_statusbar_prev_word(void);
|
||||||
void do_statusbar_next_word(void);
|
void do_statusbar_next_word(void);
|
||||||
#endif
|
#endif
|
||||||
void do_statusbar_verbatim_input(void);
|
void do_statusbar_verbatim_input(void);
|
||||||
size_t statusbar_xplustabs(void);
|
|
||||||
size_t get_statusbar_page_start(size_t start_col, size_t column);
|
size_t get_statusbar_page_start(size_t start_col, size_t column);
|
||||||
void put_cursor_at_end_of_answer(void);
|
void put_cursor_at_end_of_answer(void);
|
||||||
void add_or_remove_pipe_symbol_from_answer(void);
|
void add_or_remove_pipe_symbol_from_answer(void);
|
||||||
|
|
Loading…
Reference in New Issue