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

fix(oldfiles) : delete duplicated items in Windows #3103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 15, 2024

  1. fix(oldfiles) : delete duplicated items in Windows

    /// Problem :
    1) Duplicated items are listed in oldfiles because of neovim problem.
       Example is like below.
       c:\Users\USERS\test\telescope.lua
       c:\Users\USERS/test/telescope.lua
       c:/Users/USERS/test/telescope.lua
    
       slash(/) makes neovim lua api cannot work properly in windows.
       and string comparison don't distinguish it is the same path
    
       This makes `file ~= current_file` condition cannot filter although it is same with the file
    
    2) oldfiles show current session files also.
    
    /// Solution :
    1-1) Taking gsub('/', '\\') all files from neovim lua api.
    1-2) Add additional condition which checks whether the file is listed in results (='results_other')
    2) separate `results` variable to 2 parts.
        First, 'results' as current session file list
        Second, 'results_other' as old file list which are filtered unnecessary file
    Jaehaks committed May 15, 2024
    Configuration menu
    Copy the full SHA
    0f4b8c9 View commit details
    Browse the repository at this point in the history