Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG files show mangled names #157

Closed
benfrain opened this issue Jul 6, 2022 · 2 comments
Closed

SVG files show mangled names #157

benfrain opened this issue Jul 6, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@benfrain
Copy link

benfrain commented Jul 6, 2022

Description

Think file browser is choking on the SVG files, and mangling the names (although Preview shows the file content correctly).

Files named like this:

'bb-ball.svg' in macOS finder

Are being displayed like:

's.nocIepacsdnaL9*' in Telescope File Browser. The same file names appear correct in 'normal' Telescope.

I still see the issue if I set preview = false in the Telescope config. Mention this as it initially seemed like #133

Neovim version

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Features: +acl +iconv +tui

Operating system and version

macOS 12.4

Steps to reproduce

  1. Use macOS (don't have anything with another OS)
  2. open File Browser and look for SVG files in a folder
  3. Observe names are mangled

Expected behavior

Names in File Browser appear the same as in the standard Telescope

Actual behavior

SVG file names appear mangled

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          'nvim-telescope/telescope-file-browser.nvim',
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end
_G.load_config = function()
  require('telescope').setup()
  require('telescope').load_extension('file_browser')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
@benfrain benfrain added the bug Something isn't working label Jul 6, 2022
@fdschmidt93
Copy link
Member

fdschmidt93 commented Jul 6, 2022

I'm afraid I cannot reproduce with both plenary and fd finder on my and minimal init lua.

image

Preview (not shown) works as intended.

SVG is from wikipedia.

@benfrain
Copy link
Author

benfrain commented Jul 6, 2022

I've found the problem. Obviously nothing to do with File Browser!

Discovered this because when I opened Sublime Text, in the python command palette it told me it was disabling my font, VictorMono Nerd Font, because not all glyphs were uniform.

I tried firing up Kitty/neovim with a different font, and just like that, the problem goes away. Will maybe revisit #146 and see if it could be something to do with that too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants