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

Unable to navigate within the main editor window after loading :Minimap #5

Closed
alexxroche opened this issue Sep 26, 2020 · 8 comments
Closed

Comments

@alexxroche
Copy link

[vim version 8.1.1401 on debian ] I've applied the patch from lambdalisue. Now when I type :Minimap I get:

Error detected while processing function <SNR>33_win_enter_handler[4]..<SNR>33_source_win_enter[1]..<SNR>33_source_move:
line   13:
E716: Key not present in Dictionary: botline
Press ENTER or type command to continue
Error detected while processing function <SNR>33_cursor_move_handler[4]..<SNR>33_source_move:
line   13:
E716: Key not present in Dictionary: botline
Press ENTER or type command to continue

The minimap then loads on the right-hand side. I can Ctrl+w+w to move the cursor into the minimap window and navigate as expected but if I try to navigate in the main window by pressing j I get:

Error detected while processing function <SNR>33_cursor_move_handler[4]..<SNR>33_source_move:
line   13:
E716: Key not present in Dictionary: botline
Press ENTER or type command to continue

I can edit/write/quit files as normal, (and navigation is not effected before I type :Minimap.)

@alexxroche
Copy link
Author

(This could be due to a bug in my install script?)

@alexxroche
Copy link
Author

code-minimap seems to be working nicely.

$ code-minimap minimap.vim
⠭⠭⣭⣭⣭⣭⣭⣭⣭⣉⣉⣁⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⡀
⣒⣒⣋⣉⣉⣀⣀⣀⣀⣀⣀⣀⣀⣀⡀
⣒⣒⣋⣉⣉⣀⣀⣀⣀⣀⣀⣀
⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣦⡀
⠭⠭⣭⣭⣭⣭⣭⣭⣭⣭⣭⣭⣭⠭⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉
⠭⠭⣥⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⠄
⠭⠭⣥⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣄⣀⡀
⠭⠭⣥⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⠤
⠭⠭⣥⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤
⣀⣀⡤⠤⠿⠷⠶⠖⠒⠒⠒⠒⠒⠒⠒⠒
$ code-minimap minimap.vim|b3sum 
9ceb3498ede6f31e91509cc7f4ae1ec11f48d26415f676a04237e01463e93e66
$ b3sum minimap.vim
65eec2224e24b701ad0f209ea536ecdb986db1c821b8d8bdc93bc5ea7cd958a9  minimap.vim
$ code-minimap minimap.vim|sha1sum 
5b5c2450ec4564836ae406a971c9fd7a15e5724d  -

@wfxr
Copy link
Owner

wfxr commented Sep 27, 2020

@alexxroche I don't known why. Can you try to load the plugin using vim-plug? If that is OK it should be some problem in your manually install script.

@alexxroche
Copy link
Author

I rolled my $HOME/.vim directory back to how it was before my script installed minimap. Then I installed vim-plug with:

#!/bin/sh

# install vim-plug
curl -fsLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

# add vim-plug to .vimrc
grep -q 'insert_vim_plug' ~/.vimrc || \
cat >>~/.vimrc <<'EOF'

" Enable vim-plug
function! s:insert_vim_plug()
    let l:vimPlugFile =  $HOME . "/.vim/etc/vim-plug"
    if filereadable(l:vimPlugFile)
        exec ":source " . l:vimPlugFile
    endif
endfunction
call <SID>insert_vim_plug()

EOF

# create vim-plug rc
if [ -f "~/.vim/etc/vim-plug ]; then # add minimap to vim-plug, if it isn't already there
    grep -q 'wfxr/minimap.vim' ~/.vim/etc/vim-plug || sed -i "s,^Plug ,Plug 'wfxr/minimap.vim'\nPlug ," ~/.vim/etc/vim-plug
else
    mkdir -p ~/.vim/etc/ 2>/dev/null
    cat >>$HOME/.vim/etc/vim-plug <<EOF 
" plugins
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')

" Declare the list of plugins.
Plug 'wfxr/minimap.vim'

" List ends here. Plugins become visible to Vim after this call.
call plug#end()
EOF

# run vim-plug and inform the user 
vim -c "PlugInstall" -c "q" -c "q" && printf "\n[\033[1;33mi\033[0m] \033[1;32m vim-plug\033[0m has finished\n"

Resulted in:

Installing plugins (1/1)                                                         
[=]                                                                              
                                                                                 
- Finishing ... Done!                                                            
- minimap.vim: remote: Total 29 (delta 4), reused 19 (delta 1), pack-reused 0    

but sadly vim -c "Minimap" produces:

Error detected while processing function <SNR>36_win_enter_handler[4]..<SNR>36_source_win_enter[1]..<SNR>36_source_move:
line   13:
E716: Key not present in Dictionary: botline
Press ENTER or type command to continue
Error detected while processing function <SNR>36_cursor_move_handler[4]..<SNR>36_source_move:
line   13:
E716: Key not present in Dictionary: botline
Press ENTER or type command to continue

@wfxr
Copy link
Owner

wfxr commented Sep 27, 2020

Repro in Vim 8.0 (1-1453).

@wfxr
Copy link
Owner

wfxr commented Sep 27, 2020

Confirmed upgrading to Vim 8.2 will fix this.

Vim 8.2 on my arch linux works good. And I used the ppa from this link to test vim 8.2 under ubuntu 18.04 also works fine.

You can have a try to see if it works for you.

@alexxroche
Copy link
Author

I'm on stable debian which has vim version 8.1.1401 (so I'll wait for debian to get to 8.2 and let you know if I'm still having the problem.)

@jeromescuggs
Copy link

jeromescuggs commented Oct 11, 2020

Confirmed upgrading to Vim 8.2 will fix this.

Vim 8.2 on my arch linux works good. And I used the ppa from this link to test vim 8.2 under ubuntu 18.04 also works fine.

You can have a try to see if it works for you.

for what it's worth,

if v:version >= 802
	let g:minimap_auto_start " or whatever minimap-specific vimrc stuff
endif

is what i'm currently using in my dotfiles to gracefully avoid this issue when i find myself on a box where actually removing a line from my vimrc and/or compiling the 8.2 version isn't worth the hassle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants