mirror of
https://github.com/tmux/tmux.git
synced 2026-10-09 19:54:22 +00:00
Do not copy too many positions when deleting, GitHub issue 5478 from
Uzair Aftab.
This commit is contained in:
4
prompt.c
4
prompt.c
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: prompt.c,v 1.5 2026/07/13 10:29:17 nicm Exp $ */
|
/* $OpenBSD: prompt.c,v 1.6 2026/08/17 06:45:16 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -1334,7 +1334,7 @@ process_key:
|
|||||||
if (pr->index != size) {
|
if (pr->index != size) {
|
||||||
memmove(pr->buffer + pr->index,
|
memmove(pr->buffer + pr->index,
|
||||||
pr->buffer + pr->index + 1,
|
pr->buffer + pr->index + 1,
|
||||||
(size + 1 - pr->index) *
|
(size - pr->index) *
|
||||||
sizeof *pr->buffer);
|
sizeof *pr->buffer);
|
||||||
goto changed;
|
goto changed;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user