mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 11:11:47 +02:00
Another place where [:max_length] is used without checking
This commit is contained in:
@@ -599,7 +599,10 @@ func run_loop(opts *Options) (lp *loop.Loop, err error) {
|
|||||||
if idx > -1 {
|
if idx > -1 {
|
||||||
cached_data.Recent = slices.Delete(cached_data.Recent, idx, idx+1)
|
cached_data.Recent = slices.Delete(cached_data.Recent, idx, idx+1)
|
||||||
}
|
}
|
||||||
cached_data.Recent = slices.Insert(cached_data.Recent, 0, h.current_char)[:len(DEFAULT_SET)]
|
cached_data.Recent = slices.Insert(cached_data.Recent, 0, h.current_char)
|
||||||
|
if len(cached_data.Recent) > len(DEFAULT_SET) {
|
||||||
|
cached_data.Recent = cached_data.Recent[:len(DEFAULT_SET)]
|
||||||
|
}
|
||||||
ans := h.resolved_char()
|
ans := h.resolved_char()
|
||||||
o, err := output(ans)
|
o, err := output(ans)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user