Skip to content

Commit 2b33bf3

Browse files
authored
Merge pull request #4215 from bstaletic/finder-special-characters
Fix display of special characters in finder popups
2 parents 79c850b + 9dee4c4 commit 2b33bf3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/youcompleteme/finder.vim

+4-4
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ function! s:RedrawFinderPopup() abort
499499
\ .. line_num
500500
let path_includes_line = 1
501501

502-
let spaces = available_width - len( desc ) - len( path )
502+
let spaces = available_width - strdisplaywidth( desc ) - strdisplaywidth( path )
503503
let spacing = 4
504504
if spaces < spacing
505505
let spaces = spacing
@@ -524,16 +524,16 @@ function! s:RedrawFinderPopup() abort
524524
if len( path ) > 0
525525
if path_includes_line
526526
let props += [
527-
\ { 'col': available_width - len( path ) + 1,
527+
\ { 'col': len( desc ) + spaces + 1,
528528
\ 'length': len( path ) - len( line_num ),
529529
\ 'type': 'YCM-symbol-file' },
530-
\ { 'col': available_width - len( line_num ) + 1,
530+
\ { 'col': len( desc ) + spaces + 1 + len( path ) - len( line_num ),
531531
\ 'length': len( line_num ),
532532
\ 'type': 'YCM-symbol-line-num' },
533533
\ ]
534534
else
535535
let props += [
536-
\ { 'col': available_width - len( path ) + 1,
536+
\ { 'col': len( desc ) + spaces + 1,
537537
\ 'length': len( path ),
538538
\ 'type': 'YCM-symbol-file' },
539539
\ ]

0 commit comments

Comments
 (0)