diff options
author | Chet Ramey <chet.ramey@case.edu> | 2023-04-27 15:33:37 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2023-04-27 15:33:37 -0400 |
commit | f156385efb545a5ab96a2461555955d7f280aac4 (patch) | |
tree | 4c4ede0b0755f46629e1076b884ccf03654f5d47 /text.c | |
parent | 14144013617be12f94b99b05bf0928a8d1eba743 (diff) | |
download | readline-f156385efb545a5ab96a2461555955d7f280aac4.tar.gz |
asan updates to non-incremental search, redisplay; rework non-incremental search to avoid pointer aliasing issuesdevel
Diffstat (limited to 'text.c')
-rw-r--r-- | text.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1229,11 +1229,12 @@ _rl_rubout_char (int count, int key) c = rl_line_buffer[--rl_point]; rl_delete_text (rl_point, orig_point); /* The erase-at-end-of-line hack is of questionable merit now. */ - if (rl_point == rl_end && ISPRINT ((unsigned char)c) && _rl_last_c_pos) + if (rl_point == rl_end && ISPRINT ((unsigned char)c) && _rl_last_c_pos && _rl_last_v_pos == 0) { int l; l = rl_character_len (c, rl_point); - _rl_erase_at_end_of_line (l); + if (_rl_last_c_pos >= l) + _rl_erase_at_end_of_line (l); } } else |