Skip to content

Commit

Permalink
Merge pull request #4215 from bstaletic/finder-special-characters
Browse files Browse the repository at this point in the history
Fix display of special characters in finder popups
  • Loading branch information
mergify[bot] committed Jan 14, 2024
2 parents 79c850b + 9dee4c4 commit 2b33bf3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoload/youcompleteme/finder.vim
Expand Up @@ -499,7 +499,7 @@ function! s:RedrawFinderPopup() abort
\ .. line_num
let path_includes_line = 1

let spaces = available_width - len( desc ) - len( path )
let spaces = available_width - strdisplaywidth( desc ) - strdisplaywidth( path )
let spacing = 4
if spaces < spacing
let spaces = spacing
Expand All @@ -524,16 +524,16 @@ function! s:RedrawFinderPopup() abort
if len( path ) > 0
if path_includes_line
let props += [
\ { 'col': available_width - len( path ) + 1,
\ { 'col': len( desc ) + spaces + 1,
\ 'length': len( path ) - len( line_num ),
\ 'type': 'YCM-symbol-file' },
\ { 'col': available_width - len( line_num ) + 1,
\ { 'col': len( desc ) + spaces + 1 + len( path ) - len( line_num ),
\ 'length': len( line_num ),
\ 'type': 'YCM-symbol-line-num' },
\ ]
else
let props += [
\ { 'col': available_width - len( path ) + 1,
\ { 'col': len( desc ) + spaces + 1,
\ 'length': len( path ),
\ 'type': 'YCM-symbol-file' },
\ ]
Expand Down

0 comments on commit 2b33bf3

Please sign in to comment.