mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Added back block for when cursor not at end of line
This commit is contained in:
parent
54472ed501
commit
db96aeadf0
@ -165,6 +165,8 @@ inp_get_char(char *input, int *size)
|
|||||||
// if it wasn't an arrow key etc
|
// if it wasn't an arrow key etc
|
||||||
if (!_handle_edit(ch, input, size)) {
|
if (!_handle_edit(ch, input, size)) {
|
||||||
if (_printable(ch)) {
|
if (_printable(ch)) {
|
||||||
|
int rows, cols;
|
||||||
|
getmaxyx(stdscr, rows, cols);
|
||||||
getyx(inp_win, inp_y, inp_x);
|
getyx(inp_win, inp_y, inp_x);
|
||||||
|
|
||||||
// handle insert if not at end of input
|
// handle insert if not at end of input
|
||||||
@ -186,6 +188,11 @@ inp_get_char(char *input, int *size)
|
|||||||
wprintw(inp_win, next_ch);
|
wprintw(inp_win, next_ch);
|
||||||
wmove(inp_win, inp_y, inp_x + 1);
|
wmove(inp_win, inp_y, inp_x + 1);
|
||||||
|
|
||||||
|
if (inp_x - pad_start > cols-3) {
|
||||||
|
pad_start++;
|
||||||
|
prefresh(inp_win, 0, pad_start, rows-1, 0, rows-1, cols-1);
|
||||||
|
}
|
||||||
|
|
||||||
// otherwise just append
|
// otherwise just append
|
||||||
} else {
|
} else {
|
||||||
char bytes[MB_CUR_MAX];
|
char bytes[MB_CUR_MAX];
|
||||||
|
Loading…
Reference in New Issue
Block a user