mirror of
https://github.com/tmux/tmux.git
synced 2025-01-11 18:58:47 +00:00
Do not crash when searching for .* with extremely long lines. Reported
by Torbjorn Lonnemark, GitHub issue 3272.
This commit is contained in:
parent
42ba6c1b22
commit
c6e7568471
@ -3673,6 +3673,7 @@ window_copy_search(struct window_mode_entry *wme, int direction, int regex)
|
|||||||
if (direction &&
|
if (direction &&
|
||||||
window_copy_search_mark_at(data, fx, fy, &at) == 0 &&
|
window_copy_search_mark_at(data, fx, fy, &at) == 0 &&
|
||||||
at > 0 &&
|
at > 0 &&
|
||||||
|
data->searchmark != NULL &&
|
||||||
data->searchmark[at] == data->searchmark[at - 1]) {
|
data->searchmark[at] == data->searchmark[at - 1]) {
|
||||||
window_copy_move_after_search_mark(data, &fx, &fy,
|
window_copy_move_after_search_mark(data, &fx, &fy,
|
||||||
wrapflag);
|
wrapflag);
|
||||||
@ -3705,6 +3706,7 @@ window_copy_search(struct window_mode_entry *wme, int direction, int regex)
|
|||||||
&start) == 0) {
|
&start) == 0) {
|
||||||
while (window_copy_search_mark_at(data, fx, fy,
|
while (window_copy_search_mark_at(data, fx, fy,
|
||||||
&at) == 0 &&
|
&at) == 0 &&
|
||||||
|
data->searchmark != NULL &&
|
||||||
data->searchmark[at] ==
|
data->searchmark[at] ==
|
||||||
data->searchmark[start]) {
|
data->searchmark[start]) {
|
||||||
data->cx = fx;
|
data->cx = fx;
|
||||||
|
Loading…
Reference in New Issue
Block a user