mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 04:21:24 +08:00
Follow-up to d310910
, use EOF instead of -1 in calls to reposition()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
6c74203cbd
commit
f619d9d788
@ -673,7 +673,7 @@ static el_status_t do_insert_hist(const char *p)
|
|||||||
clear_line();
|
clear_line();
|
||||||
|
|
||||||
rl_point = 0;
|
rl_point = 0;
|
||||||
reposition(-1);
|
reposition(EOF);
|
||||||
rl_end = 0;
|
rl_end = 0;
|
||||||
|
|
||||||
return insert_string(p);
|
return insert_string(p);
|
||||||
@ -921,7 +921,7 @@ static el_status_t kill_line(void)
|
|||||||
if (Repeat < rl_point) {
|
if (Repeat < rl_point) {
|
||||||
i = rl_point;
|
i = rl_point;
|
||||||
rl_point = Repeat;
|
rl_point = Repeat;
|
||||||
reposition(-1);
|
reposition(EOF);
|
||||||
delete_string(i - rl_point);
|
delete_string(i - rl_point);
|
||||||
} else if (Repeat > rl_point) {
|
} else if (Repeat > rl_point) {
|
||||||
right(CSmove);
|
right(CSmove);
|
||||||
|
Loading…
Reference in New Issue
Block a user