From 471c0c77b33174f15dbddaa64850d37498727a97 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Mon, 6 Oct 2025 12:45:32 +0900 Subject: [PATCH] Use mapnew() --- autoload/skkeleton/popup.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/skkeleton/popup.vim b/autoload/skkeleton/popup.vim index 5fe66d778..a25d9fceb 100644 --- a/autoload/skkeleton/popup.vim +++ b/autoload/skkeleton/popup.vim @@ -13,7 +13,7 @@ function! s:open_cmdline(candidates) let opts = { \ 'border': 'none', \ 'relative': 'editor', - \ 'width': max(map(copy(a:candidates), 'strwidth(v:val)')), + \ 'width': max(mapnew(a:candidates, { _, val -> strwidth(v:val) })), \ 'height': len(a:candidates), \ 'col': getcmdscreenpos(), \ 'row': top, @@ -48,7 +48,7 @@ function! s:open(candidates) abort let opts = { \ 'border': 'none', \ 'relative': 'cursor', - \ 'width': max(map(copy(a:candidates), 'strwidth(v:val)')), + \ 'width': max(mapnew(a:candidates, { _, val -> strwidth(v:val) })), \ 'height': len(a:candidates), \ 'col': 0, \ 'row': linvert ? 0 : 1,